From dd4b617288a55e2fac3a36f5741500370489d8d5 Mon Sep 17 00:00:00 2001 From: Jan Bicker Date: Thu, 7 Mar 2024 12:32:33 +0100 Subject: [PATCH] Update packages/sprotty/src/features/move/move.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Miro Spönemann --- packages/sprotty/src/features/move/move.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/sprotty/src/features/move/move.ts b/packages/sprotty/src/features/move/move.ts index 57be622..6cc06fc 100644 --- a/packages/sprotty/src/features/move/move.ts +++ b/packages/sprotty/src/features/move/move.ts @@ -221,9 +221,8 @@ export class MoveCommand extends MergeableCommand implements IStoppableCommand { } return false; }; - const isChildOfMovedElement = recursiveCheck(sourceOrTarget); - return isChildOfMovedElement || Boolean(this.resolvedMoves.get(sourceOrTarget.id)); + return Boolean(this.resolvedMoves.get(sourceOrTarget.id)) || recursiveCheck(sourceOrTarget); }; return Boolean(