Migrate core/field_label_serializable.js to ES6 const/let

This commit is contained in:
kozbial
2021-07-21 15:45:28 -07:00
committed by Monica Kozbial
parent 9cbe84b804
commit b07c6869ba

View File

@@ -47,7 +47,7 @@ Blockly.utils.object.inherits(Blockly.FieldLabelSerializable,
* @nocollapse
*/
Blockly.FieldLabelSerializable.fromJson = function(options) {
var text = Blockly.utils.replaceMessageReferences(options['text']);
const text = Blockly.utils.replaceMessageReferences(options['text']);
// `this` might be a subclass of FieldLabelSerializable if that class doesn't
// override the static fromJson method.
return new this(text, undefined, options);