diff --git a/core/field_dropdown.js b/core/field_dropdown.js index 1de845765..3751508f1 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -392,8 +392,8 @@ Blockly.FieldDropdown.prototype.getValue = function() { * @param {string} newValue New value to set. */ Blockly.FieldDropdown.prototype.setValue = function(newValue) { - if (newValue === null || newValue === this.value_) { - return; // No change if null. + if (newValue === null || (newValue === this.value_ && this.text_)) { + return; // No change if null and text_ was initialized. } if (this.sourceBlock_ && Blockly.Events.isEnabled()) { Blockly.Events.fire(new Blockly.Events.BlockChange(