File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -451,10 +451,10 @@ class ScriptTreeGenerator {
451451 } ;
452452 case 'operator_expandableMath' : {
453453 const menuOperators = block . mutation . menuvalues ;
454- const inputs = Object . values ( block . inputs ) ;
454+ const inputCount = Number ( block . mutation . inputcount ) ;
455455 const operations = [ ] ;
456- for ( var i = 0 ; i < inputs . length ; i ++ ) {
457- const input = inputs [ i ] ;
456+ for ( let i = 1 ; i <= inputCount ; i ++ ) {
457+ const input = block . inputs [ "NUM" + i ] ;
458458 if ( input . block == null ) delete block . inputs [ input . name ] ;
459459 else operations . push ( [
460460 this . descendInputOfBlock ( block , input . name ) ,
@@ -487,7 +487,9 @@ class ScriptTreeGenerator {
487487 case "operators_expandablejoininputs" :
488488 case "operator_expandablejoininputs" : {
489489 const strings = [ ] ;
490- for ( const input of Object . values ( block . inputs ) ) {
490+ const inputCount = Number ( block . mutation . inputcount ) ;
491+ for ( let i = 1 ; i <= inputCount ; i ++ ) {
492+ const input = block . inputs [ "INPUT" + i ] ;
491493 if ( input . block == null ) delete block . inputs [ input . name ] ;
492494 else strings . push ( this . descendInputOfBlock ( block , input . name ) ) ;
493495 }
You can’t perform that action at this time.
0 commit comments