From 9bb1a84d6bef8fa95d025d65bd0c2772bceca404 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 5 Sep 2012 18:19:30 +0300 Subject: don't duplicate argument names --- lib/compress.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/compress.js b/lib/compress.js index 3d2f5404..d8def866 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -521,7 +521,10 @@ function Compressor(options, false_by_default) { if (vars_found > 0) { if (self instanceof AST_Lambda && !self.uses_arguments) { for (var i in vars) if (HOP(vars, i)) { - self.argnames.push(vars[i].name); + var sym = vars[i].name; + if (!find_if(function(arg){ return arg.name == sym.name }, self.argnames)) { + self.argnames.push(sym); + } } } else { var node = make_node(AST_Var, self, { -- cgit v1.2.3