Unverified Commit 83eacf43 authored by Beka Westberg's avatar Beka Westberg Committed by GitHub

Fix mutators not removing empty input (#2057)

parent 7f0e2484
......@@ -41,9 +41,15 @@ Blockly.domToMutation = function(container) {
}
}
if (this.itemCount_ == 0) {
if (this.emptyInputName != null) {
this.removeInput(this.emptyInputName);
}
} else {
for (var x = 0; x < this.itemCount_; x++) {
this.removeInput(this.repeatingInputName + x);
}
}
this.itemCount_ = window.parseInt(container.getAttribute('items'), 10);
for (var x = 0; x < this.itemCount_; x++) {
this.addInput(x);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment