mirror of
https://github.com/google/blockly.git
synced 2026-02-01 21:20:08 +01:00
Migrate core/field_registry.js to ES6 const/let
This commit is contained in:
@@ -54,7 +54,7 @@ Blockly.fieldRegistry.unregister = function(type) {
|
||||
* @package
|
||||
*/
|
||||
Blockly.fieldRegistry.fromJson = function(options) {
|
||||
var fieldObject = /** @type {?Blockly.IRegistrableField} */ (
|
||||
const fieldObject = /** @type {?Blockly.IRegistrableField} */ (
|
||||
Blockly.registry.getObject(Blockly.registry.Type.FIELD, options['type']));
|
||||
if (!fieldObject) {
|
||||
console.warn('Blockly could not create a field of type ' + options['type'] +
|
||||
|
||||
Reference in New Issue
Block a user