Migrate core/field_label.js to ES6 const/let

This commit is contained in:
kozbial
2021-07-21 15:32:39 -07:00
committed by Monica Kozbial
parent 1360b5bb49
commit 78fee48459

View File

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