From bfe3a8b5161457062224959bbb9938c106503f97 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sun, 21 Feb 2021 02:00:34 +0000 Subject: fix corner case with `import` (#4672) --- lib/scope.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/scope.js b/lib/scope.js index f638890f..97027274 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -197,7 +197,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) { } else if (node instanceof AST_SymbolLet) { scope.def_variable(node).exported = exported; } else if (node instanceof AST_SymbolVar) { - defun.def_variable(node, null).exported = exported; + defun.def_variable(node, node instanceof AST_SymbolImport ? undefined : null).exported = exported; entangle(defun, scope); } -- cgit v1.2.3