From a5eb44f950a70fd7bbd465a2297c08e99ff32294 Mon Sep 17 00:00:00 2001 From: Ivo Gabe de Wolff Date: Fri, 19 Feb 2016 09:13:32 +0100 Subject: [PATCH] Fix imports that are assigned to exports --- lib/parser.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/parser.ts b/lib/parser.ts index 0def89d..cff651d 100644 --- a/lib/parser.ts +++ b/lib/parser.ts @@ -42,7 +42,7 @@ export class Parser { if (exportNode) { exportNodes.push(exportNode); - if (exportNode.assignmentValue) walker.descend(exportNode.assignmentValue); + if (exportNode.assignmentValue) walker.visit(exportNode.assignmentValue); return; } walker.descend(); @@ -75,7 +75,8 @@ class Walker { this.visit(node); } - private visit(node: ts.Node) { + visit(node: ts.Node) { + if (!node) return; const saveNode = this.node; const saveIsConditional = this.isConditional; const saveIsInFunction = this.isInFunction;