recent addition of isMemberSpec needs additional guard
authorAlex Heneveld <alex.heneveld@cloudsoftcorp.com>
Tue, 4 Dec 2018 15:38:46 +0000 (15:38 +0000)
committerAlex Heneveld <alex.heneveld@cloudsoftcorp.com>
Tue, 4 Dec 2018 15:38:46 +0000 (15:38 +0000)
can get NPE since 2f61b7655706a1d96359e85b4e022cba78bb112d

ui-modules/blueprint-composer/app/components/util/model/entity.model.js

index 7d04410..603eaa9 100644 (file)
@@ -687,7 +687,7 @@ function isCluster() {
  * @returns {boolean}
  */
 function isMemberSpec() {
-    return this.parent.isCluster() && this.parent.getClusterMemberspecEntity() === this;
+    return this.parent && this.parent.isCluster() && this.parent.getClusterMemberspecEntity() === this;
 }
 
 export function baseType(s) {