diff --git a/src/plugins/duplicate/DuplicateAction.js b/src/plugins/duplicate/DuplicateAction.js index e398b6c041..57d7e7f33b 100644 --- a/src/plugins/duplicate/DuplicateAction.js +++ b/src/plugins/duplicate/DuplicateAction.js @@ -143,13 +143,16 @@ export default class DuplicateAction { let parent = objectPath[1]; let parentType = parent && this.openmct.types.get(parent.type); let child = objectPath[0]; + let childType = child && this.openmct.types.get(child.type); let locked = child.locked ? child.locked : parent && parent.locked; if (locked) { return false; } - return parentType + return childType + && childType.definition.creatable + && parentType && parentType.definition.creatable && Array.isArray(parent.composition); } diff --git a/src/plugins/move/MoveAction.js b/src/plugins/move/MoveAction.js index 2a46053074..8b46d109f9 100644 --- a/src/plugins/move/MoveAction.js +++ b/src/plugins/move/MoveAction.js @@ -154,6 +154,7 @@ export default class MoveAction { let parent = objectPath[1]; let parentType = parent && this.openmct.types.get(parent.type); let child = objectPath[0]; + let childType = child && this.openmct.types.get(child.type); if (child.locked || (parent && parent.locked)) { return false; @@ -161,6 +162,8 @@ export default class MoveAction { return parentType && parentType.definition.creatable + && childType + && childType.definition.creatable && Array.isArray(parent.composition); } }