mirror of
https://github.com/nasa/openmct.git
synced 2025-05-31 06:31:04 +00:00
Remove action works on missing objects (#2330)
This commit is contained in:
parent
e3f4da19f9
commit
76ba487261
@ -88,13 +88,10 @@ export default class RemoveAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
appliesTo(objectPath) {
|
appliesTo(objectPath) {
|
||||||
let object = objectPath[0];
|
|
||||||
let objectType = object && this.openmct.types.get(object.type);
|
|
||||||
let parent = objectPath[1];
|
let parent = objectPath[1];
|
||||||
let parentType = parent && this.openmct.types.get(parent.type);
|
let parentType = parent && this.openmct.types.get(parent.type);
|
||||||
|
|
||||||
return objectType.definition.creatable &&
|
return parentType &&
|
||||||
parentType &&
|
|
||||||
parentType.definition.creatable &&
|
parentType.definition.creatable &&
|
||||||
Array.isArray(parent.composition);
|
Array.isArray(parent.composition);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user