Skip to content

Commit 5a259e1

Browse files
authored
change patch
1 parent 90b750d commit 5a259e1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

blocks_vertical/control.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,12 +1286,13 @@ Blockly.Blocks['control_exitLoop'] = {
12861286
}
12871287
}
12881288

1289-
this.originalDisconnect = this.previousConnection.disconnect;
1290-
this.previousConnection.disconnect = function(...args) {
1291-
this.originalDisconnect.call(this, ...args);
1289+
this.originalSetParent = this.setParent;
1290+
this.setParent = function(...args) {
1291+
this.originalSetParent.call(this, ...args);
12921292

12931293
// no need for climbing
1294-
if (this.oldLoopBlock) {
1294+
if (!this.isInsertionMarker_ && args[0] === null && this.oldLoopBlock) {
1295+
var oldMutation = Blockly.Xml.domToText(this.oldLoopBlock.mutationToDom());
12951296
this.oldLoopBlock.setNextStatement(false);
12961297
this.oldLoopBlock.hasBreak_ = false;
12971298
this.updateForeverMutation(oldMutation, this.oldLoopBlock);

0 commit comments

Comments
 (0)