mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 05:17:43 -05:00
fix crash in getCompletionEntryDetails
This commit is contained in:
@@ -4379,7 +4379,7 @@ module ts {
|
||||
function getNarrowedTypeOfSymbol(symbol: Symbol, node: Node) {
|
||||
var type = getTypeOfSymbol(symbol);
|
||||
// Only narrow when symbol is variable of a structured type
|
||||
if (node && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) {
|
||||
if (node && node.parent && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) {
|
||||
loop: while (true) {
|
||||
var child = node;
|
||||
node = node.parent;
|
||||
|
||||
Reference in New Issue
Block a user