Add null check when querying for exports from a module

This commit is contained in:
Mohamed Hegazy
2015-04-06 14:54:22 -07:00
parent c53b0a5016
commit 3ca76ca53b
7 changed files with 241 additions and 1 deletions
+1 -1
View File
@@ -929,7 +929,7 @@ module ts {
// The ES6 spec permits export * declarations in a module to circularly reference the module itself. For example,
// module 'a' can 'export * from "b"' and 'b' can 'export * from "a"' without error.
function visit(symbol: Symbol) {
if (symbol.flags & SymbolFlags.HasExports && !contains(visitedSymbols, symbol)) {
if (symbol && symbol.flags & SymbolFlags.HasExports && !contains(visitedSymbols, symbol)) {
visitedSymbols.push(symbol);
if (symbol !== moduleSymbol) {
if (!result) {