File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -301,25 +301,9 @@ function parseAddonsAndUpdateSelect(arg) {
301
301
//path = require('path').resolve(__dirname, defaultOfPath + "/addons");
302
302
addons = getDirectories ( arg + "/addons" , "ofx" ) ;
303
303
304
- var a = addons ;
305
- var b = addonsToSkip ;
306
- var addonsThatShouldBeShown = [ ] ;
307
- var found ;
308
- for ( var i = 0 ; i < a . length ; i ++ ) {
309
- found = false ;
310
- // find a[i] in b
311
- for ( var j = 0 ; j < b . length ; j ++ ) {
312
- if ( a [ i ] == b [ j ] ) {
313
- found = true ;
314
- break ;
315
- }
316
- }
317
- if ( ! found ) {
318
- addonsThatShouldBeShown . push ( a [ i ] ) ;
319
- }
320
- }
321
-
322
- addons = addonsThatShouldBeShown ;
304
+ addons = addons . filter ( function ( addon ) {
305
+ return addonsToSkip . indexOf ( addon ) == - 1 ;
306
+ } ) ;
323
307
324
308
console . log ( "Reloading the addons folder, these were found:" ) ;
325
309
console . log ( addons ) ;
You can’t perform that action at this time.
0 commit comments