From a57c7ffb137efd439a3b22f75d9bb9b82a7ca7d3 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Thu, 26 Sep 2019 12:03:17 -0700 Subject: [PATCH] Clean up fields by passing the right type in fromJson (#3095) --- core/field_angle.js | 2 +- core/field_checkbox.js | 2 +- core/field_colour.js | 2 +- core/field_image.js | 2 +- core/field_label.js | 2 +- core/field_label_serializable.js | 2 +- core/field_number.js | 2 +- core/field_textinput.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/field_angle.js b/core/field_angle.js index c610df535..7ec62a5d9 100644 --- a/core/field_angle.js +++ b/core/field_angle.js @@ -97,7 +97,7 @@ Blockly.utils.object.inherits(Blockly.FieldAngle, Blockly.FieldTextInput); * @nocollapse */ Blockly.FieldAngle.fromJson = function(options) { - return new Blockly.FieldAngle(options['angle'], null, options); + return new Blockly.FieldAngle(options['angle'], undefined, options); }; /** diff --git a/core/field_checkbox.js b/core/field_checkbox.js index 5d3c0ecdd..49a0dec10 100644 --- a/core/field_checkbox.js +++ b/core/field_checkbox.js @@ -77,7 +77,7 @@ Blockly.utils.object.inherits(Blockly.FieldCheckbox, Blockly.Field); * @nocollapse */ Blockly.FieldCheckbox.fromJson = function(options) { - return new Blockly.FieldCheckbox(options['checked'], null, options); + return new Blockly.FieldCheckbox(options['checked'], undefined, options); }; /** diff --git a/core/field_colour.js b/core/field_colour.js index 31bc3b6da..532434823 100644 --- a/core/field_colour.js +++ b/core/field_colour.js @@ -79,7 +79,7 @@ Blockly.utils.object.inherits(Blockly.FieldColour, Blockly.Field); * @nocollapse */ Blockly.FieldColour.fromJson = function(options) { - return new Blockly.FieldColour(options['colour'], null, options); + return new Blockly.FieldColour(options['colour'], undefined, options); }; /** diff --git a/core/field_image.js b/core/field_image.js index fe36060e3..448913296 100644 --- a/core/field_image.js +++ b/core/field_image.js @@ -133,7 +133,7 @@ Blockly.utils.object.inherits(Blockly.FieldImage, Blockly.Field); Blockly.FieldImage.fromJson = function(options) { return new Blockly.FieldImage( options['src'], options['width'], options['height'], - null, null, null, options); + undefined, undefined, undefined, options); }; /** diff --git a/core/field_label.js b/core/field_label.js index ae1508c02..75373dab2 100644 --- a/core/field_label.js +++ b/core/field_label.js @@ -84,7 +84,7 @@ Blockly.utils.object.inherits(Blockly.FieldLabel, Blockly.Field); */ Blockly.FieldLabel.fromJson = function(options) { var text = Blockly.utils.replaceMessageReferences(options['text']); - return new Blockly.FieldLabel(text, null, options); + return new Blockly.FieldLabel(text, undefined, options); }; /** diff --git a/core/field_label_serializable.js b/core/field_label_serializable.js index 2c020519b..d43824b25 100644 --- a/core/field_label_serializable.js +++ b/core/field_label_serializable.js @@ -62,7 +62,7 @@ Blockly.utils.object.inherits(Blockly.FieldLabelSerializable, */ Blockly.FieldLabelSerializable.fromJson = function(options) { var text = Blockly.utils.replaceMessageReferences(options['text']); - return new Blockly.FieldLabelSerializable(text, null, options); + return new Blockly.FieldLabelSerializable(text, undefined, options); }; /** diff --git a/core/field_number.js b/core/field_number.js index 7f7de4afb..8ca6805c2 100644 --- a/core/field_number.js +++ b/core/field_number.js @@ -98,7 +98,7 @@ Blockly.utils.object.inherits(Blockly.FieldNumber, Blockly.FieldTextInput); */ Blockly.FieldNumber.fromJson = function(options) { return new Blockly.FieldNumber(options['value'], - null, null, null, null, options); + undefined, undefined, undefined, undefined, options); }; /** diff --git a/core/field_textinput.js b/core/field_textinput.js index 321570a4b..9901b56e1 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -80,7 +80,7 @@ Blockly.utils.object.inherits(Blockly.FieldTextInput, Blockly.Field); */ Blockly.FieldTextInput.fromJson = function(options) { var text = Blockly.utils.replaceMessageReferences(options['text']); - return new Blockly.FieldTextInput(text, null, options); + return new Blockly.FieldTextInput(text, undefined, options); }; /**