File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
packages/graphql/lib/services Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,21 @@ export class BaseExplorerService {
11
11
if ( ! include || isEmpty ( include ) ) {
12
12
return [ ...modulesContainer . values ( ) ] ;
13
13
}
14
- const whitelisted = this . includeWhitelisted ( modulesContainer , include ) ;
15
-
16
- const modules = [ ] ;
17
- const toCheck = [ ...whitelisted ] ;
14
+ const explicitlyWhitelisted = this . includeWhitelisted (
15
+ modulesContainer ,
16
+ include ,
17
+ ) ;
18
+ const modulesToInclude = [ ] ;
19
+ const toCheck = [ ...explicitlyWhitelisted ] ;
18
20
while ( toCheck . length ) {
19
- const mod = toCheck . pop ( ) ;
20
- if ( ! modules . includes ( mod ) ) {
21
- modules . push ( mod ) ;
22
- toCheck . push ( ...mod . imports ) ;
21
+ const moduleRef = toCheck . pop ( ) ;
22
+ if ( ! modulesToInclude . includes ( moduleRef ) ) {
23
+ modulesToInclude . push ( moduleRef ) ;
24
+ toCheck . push ( ...moduleRef . imports ) ;
23
25
}
24
26
}
25
27
26
- return modules ;
28
+ return modulesToInclude ;
27
29
}
28
30
29
31
includeWhitelisted (
You can’t perform that action at this time.
0 commit comments