From 65431a963beb14529d3b8ba705cbdd1f706f0c07 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 25 Feb 2015 13:54:09 -0800 Subject: [PATCH] Check if the module exist before extracting exports from it --- src/compiler/checker.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c807406d534..dc9f5d07b2d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -751,7 +751,10 @@ module ts { forEach(symbol.declarations, node => { if (node.kind === SyntaxKind.SourceFile || node.kind === SyntaxKind.ModuleDeclaration) { forEach((node).exportStars, exportStar => { - visit(resolveExternalModuleName(exportStar, exportStar.moduleSpecifier)); + var moduleSymbol = resolveExternalModuleName(exportStar, exportStar.moduleSpecifier); + if (moduleSymbol) { + visit(moduleSymbol); + } }); } });