check if domainobejct before listening for status (#3539)

This commit is contained in:
Deep Tailor 2020-11-20 15:27:57 -08:00 committed by GitHub
parent 13fe7509de
commit 4bbdac759f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,9 +97,12 @@ export default {
} else {
this.multiSelect = false;
this.domainObject = selection[0][0].context.item;
this.keyString = this.openmct.objects.makeKeyString(this.domainObject.identifier);
this.status = this.openmct.status.get(this.keyString);
this.statusUnsubscribe = this.openmct.status.observe(this.keyString, this.updateStatus);
if (this.domainObject) {
this.keyString = this.openmct.objects.makeKeyString(this.domainObject.identifier);
this.status = this.openmct.status.get(this.keyString);
this.statusUnsubscribe = this.openmct.status.observe(this.keyString, this.updateStatus);
}
}
},
resetDomainObject() {