fix latent regression from my last pr

This commit is contained in:
Evan Simkowitz 2024-09-10 22:50:28 -07:00
parent 9b12aa9882
commit 8f0cd5adcf
No known key found for this signature in database

View File

@ -303,8 +303,8 @@ const OverlayNode = memo(({ node, layoutModel }: OverlayNodeProps) => {
() => ({
accept: dragItemType,
canDrop: (_, monitor) => {
const dragItemId = monitor.getItem<string>();
if (monitor.isOver({ shallow: true }) && dragItemId !== node.id) {
const dragItem = monitor.getItem<LayoutNode>();
if (monitor.isOver({ shallow: true }) && dragItem.id !== node.id) {
return true;
}
return false;