Skip to content

Commit 4383479

Browse files
fix(ui): fix console error when dropping blocks
1 parent bbcc054 commit 4383479

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/modules/blockEvents.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ export default class BlockEvents extends Module {
146146
public dragLeave(event: DragEvent): void {
147147
const block = this.Editor.BlockManager.getBlockByChildNode(event.target as Node);
148148

149-
block.dropTarget = false;
149+
if (block) {
150+
block.dropTarget = false;
151+
}
150152
}
151153

152154
/**

0 commit comments

Comments
 (0)