From 393cdf1fa4d5a94a083755b4037e5beac28f2f6a Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Wed, 21 Jul 2021 14:18:05 -0700 Subject: [PATCH] Switch from destructuring to normal imports in core/field_checkbox.js --- core/field_checkbox.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/field_checkbox.js b/core/field_checkbox.js index 3cbe8d07f..d2ce60eaa 100644 --- a/core/field_checkbox.js +++ b/core/field_checkbox.js @@ -14,9 +14,9 @@ goog.module('Blockly.FieldCheckbox'); goog.module.declareLegacyNamespace(); const Field = goog.require('Blockly.Field'); -const {addClass} = goog.require('Blockly.utils.dom'); +const dom = goog.require('Blockly.utils.dom'); +const fieldRegistry = goog.require('Blockly.fieldRegistry'); const {inherits} = goog.require('Blockly.utils.object'); -const {register} = goog.require('Blockly.fieldRegistry'); /** @suppress {extraRequire} */ goog.require('Blockly.Events.BlockChange'); @@ -109,7 +109,7 @@ FieldCheckbox.prototype.configure_ = function(config) { FieldCheckbox.prototype.initView = function() { FieldCheckbox.superClass_.initView.call(this); - addClass( + dom.addClass( /** @type {!SVGTextElement} **/ (this.textElement_), 'blocklyCheckbox'); this.textElement_.style.display = this.value_ ? 'block' : 'none'; }; @@ -221,6 +221,6 @@ FieldCheckbox.prototype.convertValueToBool_ = function(value) { } }; -register('field_checkbox', FieldCheckbox); +fieldRegistry.register('field_checkbox', FieldCheckbox); exports = FieldCheckbox;