diff --git a/src/plugins/move/MoveAction.js b/src/plugins/move/MoveAction.js index 70d28cc58a..618eff9ef2 100644 --- a/src/plugins/move/MoveAction.js +++ b/src/plugins/move/MoveAction.js @@ -140,11 +140,13 @@ export default class MoveAction { } validate(currentParent) { - return (object, data) => { - const parentCandidate = data.value; + return (data) => { + const parentCandidatePath = data.value; + const parentCandidate = parentCandidatePath[0]; + let currentParentKeystring = this.openmct.objects.makeKeyString(currentParent.identifier); let parentCandidateKeystring = this.openmct.objects.makeKeyString(parentCandidate.identifier); - let objectKeystring = this.openmct.objects.makeKeyString(object.identifier); + let objectKeystring = this.openmct.objects.makeKeyString(this.object.identifier); if (!parentCandidateKeystring || !currentParentKeystring) { return false; @@ -163,7 +165,7 @@ export default class MoveAction { return false; } - return parentCandidate && this.openmct.composition.checkPolicy(parentCandidate, object); + return parentCandidate && this.openmct.composition.checkPolicy(parentCandidate, this.object); }; }