Remove action works on missing objects (#2330)

This commit is contained in:
Andrew Henry 2019-03-26 09:35:52 -07:00 committed by Deep Tailor
parent e3f4da19f9
commit 76ba487261

View File

@ -88,13 +88,10 @@ export default class RemoveAction {
}
appliesTo(objectPath) {
let object = objectPath[0];
let objectType = object && this.openmct.types.get(object.type);
let parent = objectPath[1];
let parentType = parent && this.openmct.types.get(parent.type);
return objectType.definition.creatable &&
parentType &&
return parentType &&
parentType.definition.creatable &&
Array.isArray(parent.composition);
}