Removed Class Option Check from Text Input fromJson (#2588)

* Removed class option check from text input fromJson, as text input fields don't accept a class.

* Fixed syntax error.
This commit is contained in:
Beka Westberg
2019-06-24 13:34:28 -07:00
committed by RoboErikG
parent fd368820ef
commit 27a6593d27

View File

@@ -67,7 +67,7 @@ goog.inherits(Blockly.FieldTextInput, Blockly.Field);
*/
Blockly.FieldTextInput.fromJson = function(options) {
var text = Blockly.utils.replaceMessageReferences(options['text']);
var field = new Blockly.FieldTextInput(text, options['class']);
var field = new Blockly.FieldTextInput(text);
if (typeof options['spellcheck'] === 'boolean') {
field.setSpellcheck(options['spellcheck']);
}