[Lada-commits] [PATCH] Fixed type error if user role has no labor_mst_id

Wald Commits scm-commit at wald.intevation.org
Thu Apr 28 11:38:30 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1461836305 -7200
# Node ID 54457d3f7f6383344cda5587ef519e8b59d1fc50
# Parent  cbe5a19449a413ca5ea41738d096b7a275293751
Fixed type error if user role has no labor_mst_id.

diff -r cbe5a19449a4 -r 54457d3f7f63 app.js
--- a/app.js	Wed Apr 13 20:11:06 2016 +0200
+++ b/app.js	Thu Apr 28 11:38:25 2016 +0200
@@ -157,6 +157,9 @@
                         for (var i = 0; i < mstLabor.length; i++) {
                             var item = store.getById(mstLabor[i].messstelle);
                             var itemLabor = store.getById(mstLabor[i].labor);
+                            if (!itemLabor) {
+                                continue;
+                            }
                             mstLaborStore.add({
                                 id: i,
                                 messStelle: mstLabor[i].messstelle,


More information about the Lada-commits mailing list