fix(compiler): don’t store invalid state when using listLazyRoutes
(#19953)
Previously, `listLazyRoute` would store invalid information in a compiler internal cache, which lead to incorrect paths that were used during emit. This commit fixes this. PR Close #19953
This commit is contained in:

committed by
Matias Niemelä

parent
eca822b756
commit
a869aeecd2
@ -80,8 +80,10 @@ export class StaticReflector implements CompileReflector {
|
||||
const refSymbol =
|
||||
this.symbolResolver.getSymbolByModule(ref.moduleName !, ref.name !, containingFile);
|
||||
const declarationSymbol = this.findSymbolDeclaration(refSymbol);
|
||||
this.symbolResolver.recordModuleNameForFileName(refSymbol.filePath, ref.moduleName !);
|
||||
this.symbolResolver.recordImportAs(declarationSymbol, refSymbol);
|
||||
if (!containingFile) {
|
||||
this.symbolResolver.recordModuleNameForFileName(refSymbol.filePath, ref.moduleName !);
|
||||
this.symbolResolver.recordImportAs(declarationSymbol, refSymbol);
|
||||
}
|
||||
return declarationSymbol;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user