From: Mihai Bazon Date: Thu, 17 Oct 2013 15:20:33 +0000 (+0300) Subject: `arguments` outside of a function is an ordinary variable. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d09f0adae3605b8bf5d90a934037f71ae0c27780;p=UglifyJS.git `arguments` outside of a function is an ordinary variable. Fix #501 --- diff --git a/lib/scope.js b/lib/scope.js index 8fc1ce0b..713a2c92 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -165,7 +165,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(){ for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) s.uses_eval = true; } - if (name == "arguments") { + if (func && name == "arguments") { func.uses_arguments = true; } } else {