From 13c4dfcabdd3e8597db6ecb09e2ac95fbae19195 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Sat, 24 Nov 2012 10:02:08 +0200 Subject: [PATCH] fix #55 --- lib/ast.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ast.js b/lib/ast.js index 4b9f5988..c0b263e7 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -287,9 +287,9 @@ var AST_Toplevel = DEFNODE("Toplevel", "globals", { }, wrap_commonjs: function(name, export_all) { var self = this; + var to_export = []; if (export_all) { self.figure_out_scope(); - var to_export = []; self.walk(new TreeWalker(function(node){ if (node instanceof AST_SymbolDeclaration && node.definition().global) { if (!find_if(function(n){ return n.name == node.name }, to_export)) -- 2.34.1