Skip to content

Commit

Permalink
fix: prevent obvious error in move preview
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Apr 26, 2024
1 parent 26aebf2 commit 48201fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/features/move/MovePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default function MovePreview(
if (target) {
if (canExecute === 'attach') {
setMarker(target, MARKER_ATTACH);
} else if (context.canExecute && target && target.id !== parent.id) {
} else if (context.canExecute && parent && target.id !== parent.id) {
setMarker(target, MARKER_NEW_PARENT);
} else {
setMarker(target, context.canExecute ? MARKER_OK : MARKER_NOT_OK);
Expand Down

0 comments on commit 48201fc

Please sign in to comment.