mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Fix null error in importTracker: VariableDeclaration might not have a VariableStatement ancestor
This commit is contained in:
1 parent
8534b430be
commit
4ff180d814
3 files changed
+23
-4
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user