File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -154,11 +154,11 @@ class LicensePlugin {
154154 let dir = path . resolve ( path . parse ( id ) . dir ) ;
155155 let pkg = null ;
156156
157- const scannedDirs = [ ] ;
157+ const scannedDirs = new Set ( ) ;
158158
159159 this . debug ( `iterative over directory tree, starting with: ${ dir } ` ) ;
160160
161- while ( dir && dir !== this . _cwd && ! scannedDirs . includes ( dir ) ) {
161+ while ( dir && dir !== this . _cwd && ! scannedDirs . has ( dir ) ) {
162162 // Try the cache.
163163 if ( this . _cache . has ( dir ) ) {
164164 pkg = this . _cache . get ( dir ) ;
@@ -170,7 +170,7 @@ class LicensePlugin {
170170 break ;
171171 }
172172
173- scannedDirs . push ( dir ) ;
173+ scannedDirs . add ( dir ) ;
174174
175175 this . debug ( `looking for package.json file in: ${ dir } ` ) ;
176176 const pkgPath = path . join ( dir , 'package.json' ) ;
You can’t perform that action at this time.
0 commit comments