Skip to content

Commit 7cfbb34

Browse files
committed
fix: fail faster
1 parent 3ec3bab commit 7cfbb34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/disabled_blocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export function enableBlocksOnDrag(event: Blockly.Events.Abstract) {
1818
// This listener only runs on Drag events that have a valid
1919
// workspace and block id.
2020
if (!isBlockDrag(event)) return;
21+
if (!event.blockId) return;
2122
const eventWorkspace = Blockly.common.getWorkspaceById(
2223
event.workspaceId,
2324
) as Blockly.WorkspaceSvg;
24-
if (!event.blockId) return;
2525
const block = eventWorkspace.getBlockById(event.blockId);
2626
if (!block) return;
2727

0 commit comments

Comments
 (0)