Skip to content

Commit d9dc66c

Browse files
author
Stanislav Idolov
committed
ENGCOM-1583: declare var to fix scope error #15265
1 parent 325a446 commit d9dc66c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ define([
3232
data = {},
3333
parameters = {},
3434
root = {},
35-
len = 0,
36-
key = '',
37-
i = 0;
35+
key = '';
3836

3937
/* eslint-disable */
4038
/**
@@ -182,11 +180,14 @@ define([
182180
* @returns {Object}
183181
*/
184182
categoryLoader.buildHashChildren = function (hash, node) {// eslint-disable-line no-shadow
183+
var i = 0,
184+
len;
185+
185186
// eslint-disable-next-line no-extra-parens
186187
if ((node.childNodes.length > 0) || (node.loaded === false && node.loading === false)) {
187188
hash.children = [];
188189

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

0 commit comments

Comments
 (0)