Check if the module exist before extracting exports from it

This commit is contained in:
Mohamed Hegazy
2015-02-25 13:54:09 -08:00
parent eb09401df7
commit 65431a963b

View File

@@ -751,7 +751,10 @@ module ts {
forEach(symbol.declarations, node => {
if (node.kind === SyntaxKind.SourceFile || node.kind === SyntaxKind.ModuleDeclaration) {
forEach((<ExportContainer>node).exportStars, exportStar => {
visit(resolveExternalModuleName(exportStar, exportStar.moduleSpecifier));
var moduleSymbol = resolveExternalModuleName(exportStar, exportStar.moduleSpecifier);
if (moduleSymbol) {
visit(moduleSymbol);
}
});
}
});