diff --git a/src/js/qmHelpers.js b/src/js/qmHelpers.js index 471b86a36c..71f73ee08b 100644 --- a/src/js/qmHelpers.js +++ b/src/js/qmHelpers.js @@ -4247,7 +4247,7 @@ var qm = { inputType: src.inputType || (unit) ? unit.inputType : null, maximumAllowedValue: src.maximumAllowedValue || (unit) ? unit.maximum : null, minimumAllowedValue: src.minimumAllowedValue || (unit) ? unit.minimum : null, - pngPath: src.pngPath || src.image, + pngPath: src.pngPath || src.image || (cat) ? cat.pngUrl : null, startAt: qm.timeHelper.toDate(timeAt), startTime: qm.timeHelper.toUnixTime(timeAt), unitAbbreviatedName: (unit) ? unit.abbreviatedName : null, @@ -9979,6 +9979,7 @@ var qm = { } else { nameOrId = v.variableCategoryId || v.variableCategoryName; } + if(!nameOrId){return null;} return qm.variableCategoryHelper.getByNameOrId(nameOrId); } },