Dropdown Create does not create a missing variable twice.

This commit is contained in:
marisaleung
2017-06-26 16:50:42 -07:00
parent 693bdbb10e
commit 3c8e0ebbeb
3 changed files with 81 additions and 6 deletions

View File

@@ -211,7 +211,7 @@ Blockly.VariableMap.prototype.getVariablesOfType = function(type) {
type = type || '';
var variable_list = this.variableMap_[type];
if (variable_list) {
return variable_list;
return variable_list.slice();
}
return [];
};