Skip to content

Commit

Permalink
ENGCOM-2884: [Forwardport] declare var to fix scope error #17816
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Idolov authored Aug 29, 2018
2 parents aa6ae1a + b95af5e commit 82a45a1
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ define([
data = {},
parameters = {},
root = {},
len = 0,
key = '';

/**
Expand Down Expand Up @@ -160,15 +159,15 @@ define([
* @returns {void}
*/
categoryLoader.buildCategoryTree = function (parent, nodeConfig) {
var j = 0;
var i = 0;

if (!nodeConfig) {
return null;
}

if (parent && nodeConfig && nodeConfig.length) {
for (j = 0; j < nodeConfig.length; j++) {
categoryLoader.processCategoryTree(parent, nodeConfig, j);
for (i; i < nodeConfig.length; i++) {
categoryLoader.processCategoryTree(parent, nodeConfig, i);
}
}
};
Expand All @@ -180,14 +179,15 @@ define([
* @returns {Object}
*/
categoryLoader.buildHashChildren = function (hash, node) {
var j = 0;
var i = 0,
len;

if (node.childNodes.length > 0 || node.loaded === false && node.loading === false) {
hash.children = [];

for (j = 0, len = node.childNodes.length; j < len; j++) {
for (i, len = node.childNodes.length; i < len; i++) {
hash.children = hash.children ? hash.children : [];
hash.children.push(this.buildHash(node.childNodes[j]));
hash.children.push(this.buildHash(node.childNodes[i]));
}
}

Expand Down

0 comments on commit 82a45a1

Please sign in to comment.