Skip to content

Commit 5306e2a

Browse files
committed
Small changes in null checks
1 parent 16036e0 commit 5306e2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commcare/src/main/resources/webapp/js/controllers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,14 @@
280280
$scope.$parent.configurations.configs.splice($scope.$parent.configurations.configs.indexOf(oldValue), 1);
281281
$scope.$parent.$apply();
282282
$scope.configOutdated = false;
283-
if (newValue === undefined || newValue.name !== "") {
283+
if (!newValue || newValue.name) {
284284
$scope.newConfig = false;
285285
}
286286
$scope.clearMessages();
287287
} else if ($scope.configOutdated) {
288288
$scope.$parent.configurations.configs[$scope.$parent.configurations.configs.indexOf(oldValue)] = $scope.selectedConfigBackup;
289289
$scope.configOutdated = false;
290-
if (newValue.name === "") {
290+
if (!newValue.name) {
291291
$scope.newConfig = true;
292292
}
293293
$scope.clearMessages();
@@ -297,7 +297,7 @@
297297
} else {
298298
$scope.rollback = false;
299299
}
300-
} else if (newValue && newValue.name === "") {
300+
} else if (newValue && !newValue.name) {
301301
$scope.newConfig = true;
302302
$scope.oldName = "";
303303
$scope.clearMessages();

0 commit comments

Comments
 (0)