Skip to content

Commit 29a7306

Browse files
authored
operators.js -- fix shadow values not saving on mutations P1
1 parent c2e5588 commit 29a7306

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

blocks_vertical/operators.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Blockly.Blocks['operator_expandableMath'] = {
228228
const menu = input.appendField(this.menuGenerator());
229229
menu.fieldRow[0].setValue(menuValues[i - 1] ? menuValues[i - 1] : "+", true);
230230
}
231-
this.fillInBlock(input.connection, "math_number");
231+
// vm will automatically replace empty inputs with saved shadows
232232
}
233233
this.oldInputs_ = this.inputs_;
234234
},
@@ -702,9 +702,8 @@ Blockly.Blocks['operator_expandablejoininputs'] = {
702702
const inputCount = Number(xmlElement.getAttribute("inputcount"));
703703
this.inputs_ = isNaN(inputCount) ? 0 : inputCount;
704704
for (let i = 0; i < this.inputs_; i++) {
705-
const input = this.appendValueInput(`INPUT${i + 1}`);
706-
const text = this.messageList[i];
707-
this.fillInBlock(input.connection, "text", text ? text : "...", "TEXT");
705+
// vm will automatically replace empty inputs with saved shadows
706+
this.appendValueInput(`INPUT${i + 1}`);
708707
}
709708
this.oldInputs_ = this.inputs_;
710709
},

0 commit comments

Comments
 (0)