fix(language-service): do not crash when Angular cannot be located (#14123)
Fixes #14122 PR Close #14123
This commit is contained in:

committed by
Miško Hevery

parent
5f2b3173d7
commit
49fb8143e8
@ -321,7 +321,12 @@ export class StaticSymbolResolver {
|
||||
getSymbolByModule(module: string, symbolName: string, containingFile?: string): StaticSymbol {
|
||||
const filePath = this.resolveModule(module, containingFile);
|
||||
if (!filePath) {
|
||||
throw new Error(`Could not resolve module ${module} relative to ${containingFile}`);
|
||||
this.reportError(
|
||||
new Error(`Could not resolve module ${module}${containingFile ? ` relative to $ {
|
||||
containingFile
|
||||
} `: ''}`),
|
||||
null);
|
||||
return this.getStaticSymbol(`ERROR:${module}`, symbolName);
|
||||
}
|
||||
return this.getStaticSymbol(filePath, symbolName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user