Skip to content

Commit b728c84

Browse files
ENGCOM-1583: declare var to fix scope error #15265
2 parents 85df843 + 65019ab commit b728c84

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/category-checkbox-tree.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,14 @@ define([
162162
* @returns {void}
163163
*/
164164
categoryLoader.buildCategoryTree = function (parent, config) {// eslint-disable-line no-shadow
165+
var i = 0;
165166

166167
if (!config) {
167168
return null;
168169
}
169170

170171
if (parent && config && config.length) {
171-
for (i = 0; i < config.length; i++) {
172+
for (i; i < config.length; i++) {
172173
categoryLoader.processCategoryTree(parent, config, i);
173174
}
174175
}
@@ -185,7 +186,7 @@ define([
185186
if ((node.childNodes.length > 0) || (node.loaded === false && node.loading === false)) {
186187
hash.children = [];
187188

188-
for (i = 0, len = node.childNodes.length; i < len; i++) {
189+
for (var i = 0, len = node.childNodes.length; i < len; i++) {
189190
/* eslint-disable */
190191
if (!hash.children) {
191192
hash.children = [];

0 commit comments

Comments
 (0)