Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08ab517

Browse files
committed
fix crash in getCompletionEntryDetails
1 parent 852d14e commit 08ab517

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4379,7 +4379,7 @@ module ts {
43794379
function getNarrowedTypeOfSymbol(symbol: Symbol, node: Node) {
43804380
var type = getTypeOfSymbol(symbol);
43814381
// Only narrow when symbol is variable of a structured type
4382-
if (node && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) {
4382+
if (node && node.parent && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) {
43834383
loop: while (true) {
43844384
var child = node;
43854385
node = node.parent;

0 commit comments

Comments
 (0)