Respond to review comments in variable_map

This commit is contained in:
Rachel Fenichel
2017-12-07 13:12:20 -08:00
parent f0b7190603
commit e77b498504
2 changed files with 16 additions and 18 deletions

View File

@@ -135,6 +135,8 @@ Blockly.FieldVariable.prototype.getText = function() {
* variable.
*/
Blockly.FieldVariable.prototype.setValue = function(id) {
// What do I do when id is null? That happens when undoing a change event
// for the first time the value was set.
var workspace = this.sourceBlock_.workspace;
var variable = Blockly.Variables.getVariable(workspace, id);