File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments