Skip to content

Commit 39fb043

Browse files
committed
Forbid moving root instance
1 parent a535575 commit 39fb043

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/builder/app/builder/features/navigator/navigator-tree.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@ const getBuilderDropTarget = (
437437
};
438438

439439
const canDrag = (instance: Instance, instanceSelector: InstanceSelector) => {
440+
// forbid moving root instance
441+
if (instanceSelector.length === 1) {
442+
return false;
443+
}
440444
if ($isContentMode.get()) {
441445
const parentId = instanceSelector[1];
442446
const parentInstance = $instances.get().get(parentId);

0 commit comments

Comments
 (0)