Merge this if statement with the enclosing one. 37/98037/1
authoranushadasari <danush10@in.ibm.com>
Wed, 6 Nov 2019 11:12:25 +0000 (16:42 +0530)
committeranushadasari <danush10@in.ibm.com>
Wed, 6 Nov 2019 11:12:38 +0000 (16:42 +0530)
Merging collapsible if statements increases the code's readability.

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

index 6d8dde8..9037b99 100755 (executable)
             if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
                 if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
                     vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-                    if (vnfModel !== undefined) {\r
-\r
-                        if (!($scope.isObjectEmpty(vnfModel.volumeGroups))) {\r
+                    if (vnfModel !== undefined && !($scope.isObjectEmpty(vnfModel.volumeGroups))) {\r
                             //console.log ("vnfModel.volumeGroups: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));\r
                             return (vnfModel.volumeGroups);\r
                         }\r
-                    }\r
                 }\r
                 else {\r
                     // old flow\r