aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard van Velzen <rvanvelzen1@gmail.com>2015-01-04 14:02:08 +0100
committerRichard van Velzen <rvanvelzen1@gmail.com>2015-01-04 14:02:08 +0100
commit37c17d55410ced4283fe173110efb99f33885c54 (patch)
treebba0d199e290a1d3b3de872fc9d9666d6a726b0c
parent120948fa48278f3769acd4e57b7456ea5419a5f2 (diff)
parentf4d36a58c28cd6dd598a5e92c6ab56605b8c17e4 (diff)
downloadtracifyjs-37c17d55410ced4283fe173110efb99f33885c54.tar.gz
tracifyjs-37c17d55410ced4283fe173110efb99f33885c54.zip
Merge pull request #570 from rvanvelzen/fix-569
Fix #569
-rw-r--r--lib/compress.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index f8030722..2c950992 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1722,6 +1722,11 @@ merge(Compressor.prototype, {
}).transform(compressor);
break;
case "Function":
+ // new Function() => function(){}
+ if (self.args.length == 0) return make_node(AST_Function, self, {
+ argnames: [],
+ body: []
+ });
if (all(self.args, function(x){ return x instanceof AST_String })) {
// quite a corner-case, but we can handle it:
// https://github.com/mishoo/UglifyJS2/issues/203