Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/gui/app/directives/conditional-effect/conditionDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
$ctrl.leftSideValueDisplay = "[Not Set]";

function getRightSideValueDisplay() {
return $q(async resolve => {
if ($ctrl.condition == null || $ctrl.condition.rightSideValue == null) {
return $q(async (resolve) => {
if ($ctrl.condition == null || $ctrl.condition.rightSideValue == null || $ctrl.condition.rightSideValue === "") {
resolve("[Not Set]");
} else {
const value = await $injector.invoke($ctrl.conditionType.getRightSideValueDisplay, {}, {
Expand All @@ -59,8 +59,8 @@
}

function getLeftSideValueDisplay() {
return $q(async resolve => {
if ($ctrl.condition == null || $ctrl.condition.leftSideValue == null) {
return $q(async (resolve) => {
if ($ctrl.condition == null || $ctrl.condition.leftSideValue == null || $ctrl.condition.leftSideValue === "") {
resolve("[Not Set]");
} else {
const value = await $injector.invoke($ctrl.conditionType.getLeftSideValueDisplay, {}, {
Expand All @@ -72,20 +72,20 @@
}

$ctrl.$onInit = function() {
getRightSideValueDisplay().then(value => {
$ctrl.rightSideValueDisplay = value;
getRightSideValueDisplay().then((value) => {
$ctrl.rightSideValueDisplay = value || "[Not Set]";
});
getLeftSideValueDisplay().then(value => {
$ctrl.leftSideValueDisplay = value;
getLeftSideValueDisplay().then((value) => {
$ctrl.leftSideValueDisplay = value || "[Not Set]";
});
};

$ctrl.$onChanges = function() {
getRightSideValueDisplay().then(value => {
$ctrl.rightSideValueDisplay = value;
getRightSideValueDisplay().then((value) => {
$ctrl.rightSideValueDisplay = value || "[Not Set]";
});
getLeftSideValueDisplay().then(value => {
$ctrl.leftSideValueDisplay = value;
getLeftSideValueDisplay().then((value) => {
$ctrl.leftSideValueDisplay = value || "[Not Set]";
});
};
}
Expand Down