Skip to content

Commit dbd46af

Browse files
authored
fix block deletion for expandables
1 parent 23a42c7 commit dbd46af

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

blocks_vertical/operators.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ Blockly.Blocks['operator_expandableMath'] = {
222222
for (let i = 1; i < connections.length; i++) {
223223
const block = connections[i].targetBlock();
224224
if (!block) continue;
225-
if (!block.category_ && !block.isShadow()) block.dispose();
225+
if (
226+
!block.category_ && !block.isShadow() &&
227+
!block.type.startsWith("procedures_") && !block.type.startsWith("argument_")
228+
) block.dispose();
226229
}
227230
});
228231
},
@@ -713,7 +716,10 @@ Blockly.Blocks['operators_expandablejoininputs'] = {
713716
for (let i = 1; i < connections.length; i++) {
714717
const block = connections[i].targetBlock();
715718
if (!block) continue;
716-
if (!block.category_ && !block.isShadow()) block.dispose();
719+
if (
720+
!block.category_ && !block.isShadow() &&
721+
!block.type.startsWith("procedures_") && !block.type.startsWith("argument_")
722+
) block.dispose();
717723
}
718724
});
719725
},

0 commit comments

Comments
 (0)