From 78b8e2fa85aae38ca3c01ef7b194863a21c9071e Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Tue, 13 Jul 2021 14:42:56 -0700 Subject: [PATCH] Migrate object.js to ES6 const/let --- core/utils/object.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/utils/object.js b/core/utils/object.js index 3e95934d2..1317fd58b 100644 --- a/core/utils/object.js +++ b/core/utils/object.js @@ -46,7 +46,7 @@ Blockly.utils.object.inherits = function(childCtor, parentCtor) { * @param {!Object} source Source. */ Blockly.utils.object.mixin = function(target, source) { - for (var x in source) { + for (const x in source) { target[x] = source[x]; } }; @@ -58,7 +58,7 @@ Blockly.utils.object.mixin = function(target, source) { * @return {!Object} The resulting object. */ Blockly.utils.object.deepMerge = function(target, source) { - for (var x in source) { + for (const x in source) { if (source[x] != null && typeof source[x] === 'object') { target[x] = Blockly.utils.object.deepMerge( target[x] || Object.create(null), source[x]);