Replace "==" with "===". 51/96451/1
authoranushadasari <danush10@in.ibm.com>
Tue, 1 Oct 2019 07:33:51 +0000 (13:03 +0530)
committeranushadasari <danush10@in.ibm.com>
Tue, 1 Oct 2019 07:34:12 +0000 (13:04 +0530)
The == and != operators do type coercion before comparing values. This is bad because it can mask type errors. For example, it evaluates ' \t\r\n' == 0 as true.
It is best to always use the side-effect-less === and !== operators instead.

Issue-ID: VID-656
Change-Id: If93fe032fae618bb0bd7112c24a0e4d3acab6337
Signed-off-by: anushadasari <danush10@in.ibm.com>
vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js

index b3afcd8..6d8dde8 100755 (executable)
@@ -35,7 +35,7 @@
         $scope.properties = UtilityService.getProperties();\r
         $scope.resumeStatus = COMPONENT.RESUME_STATUS;\r
         //isPermitted - returned as string from url and converted into boolean\r
-        $scope.isPermitted = $location.search().isPermitted == "true";\r
+        $scope.isPermitted = $location.search().isPermitted === "true";\r
         $scope.STATUS_CONSTANTS = FIELD.STATUS;\r
         $scope.pnfs = [];// PNF data init;\r
         $scope.collectionResource = {};\r