From a106f37cbb3f9a1dd62062c3ed5eedb7b472c0c4 Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Mon, 26 Jul 2021 11:33:46 -0700 Subject: [PATCH] Migrate core/theme.js to ES6 const/let --- core/theme.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/theme.js b/core/theme.js index 182710f16..75bfb3779 100644 --- a/core/theme.js +++ b/core/theme.js @@ -165,7 +165,7 @@ Blockly.Theme.prototype.setCategoryStyle = function(categoryStyleName, * @return {?string} The style value. */ Blockly.Theme.prototype.getComponentStyle = function(componentName) { - var style = this.componentStyles[componentName]; + const style = this.componentStyles[componentName]; if (style && typeof style == 'string' && this.getComponentStyle(/** @type {string} */ (style))) { return this.getComponentStyle(/** @type {string} */ (style)); @@ -207,8 +207,8 @@ Blockly.Theme.prototype.setStartHats = function(startHats) { * @return {!Blockly.Theme} A new Blockly theme. */ Blockly.Theme.defineTheme = function(name, themeObj) { - var theme = new Blockly.Theme(name); - var base = themeObj['base']; + const theme = new Blockly.Theme(name); + let base = themeObj['base']; if (base) { if (typeof base == "string") { base = Blockly.registry.getObject(Blockly.registry.Type.THEME, base);