File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,25 +301,9 @@ function parseAddonsAndUpdateSelect(arg) {
301301 //path = require('path').resolve(__dirname, defaultOfPath + "/addons");
302302 addons = getDirectories ( arg + "/addons" , "ofx" ) ;
303303
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+ } ) ;
323307
324308 console . log ( "Reloading the addons folder, these were found:" ) ;
325309 console . log ( addons ) ;
You can’t perform that action at this time.
0 commit comments