mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Fix #1499 and add some validation
This commit is contained in:
@@ -1340,7 +1340,8 @@ Blockly.Block.newFieldTextInputFromJson_ = function(options) {
|
||||
Blockly.Block.newFieldVariableFromJson_ = function(options) {
|
||||
var varname = Blockly.utils.replaceMessageReferences(options['variable']);
|
||||
var variableTypes = options['variableTypes'];
|
||||
return new Blockly.FieldVariable(varname, null, variableTypes);
|
||||
var defaultType = options['defaultType'];
|
||||
return new Blockly.FieldVariable(varname, null, variableTypes, defaultType);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user