From fc5b89dacdac17f70e543f9e9812130084918b6e Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Tue, 18 Aug 2015 08:43:47 -0400 Subject: [PATCH] fix global detection --- src/Module.js | 2 +- src/Statement.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module.js b/src/Module.js index 909acf3..7e8a87c 100644 --- a/src/Module.js +++ b/src/Module.js @@ -208,7 +208,7 @@ export default class Module { // if names are referenced that are neither defined nor imported // in this module, we assume that they're globals this.statements.forEach( statement => { - if ( statement.isExportDeclaration ) return; + if ( statement.isReexportDeclaration ) return; keys( statement.dependsOn ).forEach( name => { if ( !this.definitions[ name ] && !this.imports[ name ] ) { diff --git a/src/Statement.js b/src/Statement.js index 00d4c4e..e11567c 100644 --- a/src/Statement.js +++ b/src/Statement.js @@ -164,7 +164,7 @@ export default class Statement { const definingScope = scope.findDefiningScope( node.name ); - if ( ( !definingScope || definingScope.depth === 0 ) && !this.defines[ node.name ] ) { + if ( !definingScope || definingScope.depth === 0 ) { this.dependsOn[ node.name ] = true; if ( strong ) this.stronglyDependsOn[ node.name ] = true; }