Fix null error in importTracker: VariableDeclaration might not have a VariableStatement ancestor

This commit is contained in:
Andy Hanson committed 2017-04-21 07:55:16 -07:00
1 parent 8534b430be
commit 4ff180d814
3 files changed
+23 -4

No files matched your search

+1 -1
View File
@@ -1870,7 +1870,7 @@ namespace ts {
}
}
export function getAncestor(node: Node | undefined, kind: SyntaxKind): Node {
export function getAncestor(node: Node | undefined, kind: SyntaxKind): Node | undefined {
while (node) {
if (node.kind === kind) {
return node;