From f0909bdc8f747c46b1359bcca72bf785b660be70 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Thu, 17 Jan 2013 11:01:38 +0200 Subject: [PATCH] Handle String() with no arguments. Fix #91 --- lib/compress.js | 3 +++ 1 file changed, 3 insertions(+) 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: "+", -- 2.34.1