From: Mihai Bazon Date: Thu, 17 Jan 2013 09:01:38 +0000 (+0200) Subject: Handle String() with no arguments. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f0909bdc8f747c46b1359bcca72bf785b660be70;p=UglifyJS.git Handle String() with no arguments. Fix #91 --- diff --git a/lib/compress.js b/lib/compress.js index 0f3a795c..982b2b19 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1566,6 +1566,9 @@ merge(Compressor.prototype, { } break; case "String": + if (self.args.length == 0) return make_node(AST_String, self, { + value: "" + }); return make_node(AST_Binary, self, { left: self.args[0], operator: "+",