From 047c62c24025b9ec0086223b9248a464c6d63501 Mon Sep 17 00:00:00 2001 From: Jason Killian Date: Fri, 15 Jan 2016 15:48:22 -0500 Subject: [PATCH] Fix issue #6478 (bug in the language services) --- src/services/services.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/services/services.ts b/src/services/services.ts index 8e998760b49..062e3da1bfa 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -6028,6 +6028,10 @@ namespace ts { */ function getPropertySymbolsFromBaseTypes(symbol: Symbol, propertyName: string, result: Symbol[], previousIterationSymbolsCache: SymbolTable): void { + if (!symbol) { + return; + } + // If the current symbol is the same as the previous-iteration symbol, we can just return the symbol that has already been visited // This is particularly important for the following cases, so that we do not infinitely visit the same symbol. // For example: @@ -6043,7 +6047,7 @@ namespace ts { return; } - if (symbol && symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { + if (symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { forEach(symbol.getDeclarations(), declaration => { if (declaration.kind === SyntaxKind.ClassDeclaration) { getPropertySymbolFromTypeReference(getClassExtendsHeritageClauseElement(declaration));