diff --git a/src/gui/app/directives/conditional-effect/conditionDisplay.js b/src/gui/app/directives/conditional-effect/conditionDisplay.js index 5e3fc4757..721f6f937 100644 --- a/src/gui/app/directives/conditional-effect/conditionDisplay.js +++ b/src/gui/app/directives/conditional-effect/conditionDisplay.js @@ -47,7 +47,7 @@ function getRightSideValueDisplay() { return $q(async (resolve) => { - if ($ctrl.condition == null || $ctrl.condition.rightSideValue == null || $ctrl.condition.rightSideValue === "") { + if ($ctrl.condition == null || $ctrl.condition.rightSideValue === null || $ctrl.condition.rightSideValue === undefined || $ctrl.condition.rightSideValue === "") { resolve("[Not Set]"); } else { const value = await $injector.invoke($ctrl.conditionType.getRightSideValueDisplay, {}, { @@ -60,7 +60,7 @@ function getLeftSideValueDisplay() { return $q(async (resolve) => { - if ($ctrl.condition == null || $ctrl.condition.leftSideValue == null || $ctrl.condition.leftSideValue === "") { + if ($ctrl.condition == null || $ctrl.condition.leftSideValue === null || $ctrl.condition.leftSideValue === undefined || $ctrl.condition.leftSideValue === "") { resolve("[Not Set]"); } else { const value = await $injector.invoke($ctrl.conditionType.getLeftSideValueDisplay, {}, { @@ -73,19 +73,19 @@ $ctrl.$onInit = function() { getRightSideValueDisplay().then((value) => { - $ctrl.rightSideValueDisplay = value || "[Not Set]"; + $ctrl.rightSideValueDisplay = value !== null && value !== undefined ? value : "[Not Set]"; }); getLeftSideValueDisplay().then((value) => { - $ctrl.leftSideValueDisplay = value || "[Not Set]"; + $ctrl.leftSideValueDisplay = value !== null && value !== undefined ? value : "[Not Set]"; }); }; $ctrl.$onChanges = function() { getRightSideValueDisplay().then((value) => { - $ctrl.rightSideValueDisplay = value || "[Not Set]"; + $ctrl.rightSideValueDisplay = value !== null && value !== undefined ? value : "[Not Set]"; }); getLeftSideValueDisplay().then((value) => { - $ctrl.leftSideValueDisplay = value || "[Not Set]"; + $ctrl.leftSideValueDisplay = value !== null && value !== undefined ? value : "[Not Set]"; }); }; }