fix(language-service): avoid throwing for invalid class declarations (#13257)
Fixes #13253
This commit is contained in:

committed by
Alex Rickabaugh

parent
5614c4ff0f
commit
93556a5720
@ -325,7 +325,7 @@ export class TypeScriptServiceHost implements LanguageServiceHost {
|
||||
case this.ts.SyntaxKind.StringLiteral:
|
||||
let [declaration, decorator] = this.getTemplateClassDeclFromNode(node);
|
||||
let queryCache: SymbolQuery|undefined = undefined;
|
||||
if (declaration) {
|
||||
if (declaration && declaration.name) {
|
||||
const sourceFile = this.getSourceFile(fileName);
|
||||
return this.getSourceFromDeclaration(
|
||||
fileName, version, this.stringOf(node), shrink(spanOf(node)),
|
||||
|
Reference in New Issue
Block a user