aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2013-01-17 11:01:38 +0200
committerMihai Bazon <mihai@bazon.net>2013-01-17 11:01:38 +0200
commitf0909bdc8f747c46b1359bcca72bf785b660be70 (patch)
tree03ae1a5f7feeaae6f7a5b052a7548f0e99d5cfac /lib/compress.js
parentc058d8b9cdb30b4fc14490d5274f53a84b97f78d (diff)
downloadtracifyjs-f0909bdc8f747c46b1359bcca72bf785b660be70.tar.gz
tracifyjs-f0909bdc8f747c46b1359bcca72bf785b660be70.zip
Handle String() with no arguments.
Fix #91
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js3
1 files changed, 3 insertions, 0 deletions
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: "+",