Skip to content

Commit 0965c58

Browse files
refactor(graphql): make prop names somewhat more descriptive
1 parent 4abf52f commit 0965c58

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

packages/graphql/lib/services/base-explorer.service.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@ export class BaseExplorerService {
1111
if (!include || isEmpty(include)) {
1212
return [...modulesContainer.values()];
1313
}
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];
1820
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);
2325
}
2426
}
2527

26-
return modules;
28+
return modulesToInclude;
2729
}
2830

2931
includeWhitelisted(

0 commit comments

Comments
 (0)