File tree 1 file changed +8
-2
lines changed
app/code/Magento/Catalog/view/adminhtml/web/js
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -162,14 +162,16 @@ define([
162
162
* @returns {void }
163
163
*/
164
164
categoryLoader . buildCategoryTree = function ( parent , config ) { // eslint-disable-line no-shadow
165
+ var i = 0 ;
165
166
166
167
if ( ! config ) {
167
168
return null ;
168
169
}
169
170
170
171
if ( parent && config && config . length ) {
171
- for ( i = 0 ; i < config . length ; i ++ ) {
172
+ while ( i < config . length ) {
172
173
categoryLoader . processCategoryTree ( parent , config , i ) ;
174
+ i ++ ;
173
175
}
174
176
}
175
177
} ;
@@ -181,17 +183,21 @@ define([
181
183
* @returns {Object }
182
184
*/
183
185
categoryLoader . buildHashChildren = function ( hash , node ) { // eslint-disable-line no-shadow
186
+ var i = 0 , len ;
187
+
184
188
// eslint-disable-next-line no-extra-parens
185
189
if ( ( node . childNodes . length > 0 ) || ( node . loaded === false && node . loading === false ) ) {
190
+ len = node . childNodes . length ;
186
191
hash . children = [ ] ;
187
192
188
- for ( i = 0 , len = node . childNodes . length ; i < len ; i ++ ) {
193
+ while ( i < len ) {
189
194
/* eslint-disable */
190
195
if ( ! hash . children ) {
191
196
hash . children = [ ] ;
192
197
}
193
198
/* eslint-enable */
194
199
hash . children . push ( this . buildHash ( node . childNodes [ i ] ) ) ;
200
+ i ++ ;
195
201
}
196
202
}
197
203
You can’t perform that action at this time.
0 commit comments