refactor(ngcc): avoid returning the same top-level helper calls multiple times (#34512)
This change should not have any impact on the code's behavior (based on how the function is currently used), but it will avoid unnecessary work. PR Close #34512
This commit is contained in:
parent
17d5e2bc99
commit
6606ce69f6
|
@ -95,7 +95,7 @@ export class CommonJsReflectionHost extends Esm5ReflectionHost {
|
|||
const helperCallsMap = getOrDefault(this.topLevelHelperCalls, helperName, () => new Map());
|
||||
calls.push(...getOrDefault(
|
||||
helperCallsMap, sourceFile,
|
||||
() => sourceFile.statements.map(statement => this.getHelperCall(statement, helperNames))
|
||||
() => sourceFile.statements.map(statement => this.getHelperCall(statement, [helperName]))
|
||||
.filter(isDefined)));
|
||||
});
|
||||
return calls;
|
||||
|
|
Loading…
Reference in New Issue