Skip to content

Commit

Permalink
refactor: address bug when new item dragged in
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Feb 21, 2025
1 parent 506fdf3 commit 1ffc23e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/components/DraggableComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const DraggableComponent = ({
const containsActiveZone =
Object.values(localZones).filter(Boolean).length > 0;

const path = useNodeStore((s) => s.nodes[id]?.path || []);
const path = useNodeStore((s) => s.nodes[id]?.path);

const item = useNodeStore((s) => s.nodes[id]?.data);

Expand Down Expand Up @@ -181,7 +181,7 @@ export const DraggableComponent = ({
componentType,
containsActiveZone,
depth,
path,
path: path || [],
inDroppableZone,
},
collisionPriority: isEnabled ? depth : 0,
Expand Down

0 comments on commit 1ffc23e

Please sign in to comment.