Adding arrow functions
This commit is contained in:
@@ -1019,6 +1019,7 @@ merge(Compressor.prototype, {
|
||||
});
|
||||
|
||||
OPT(AST_Block, function(self, compressor){
|
||||
if (self.body instanceof AST_Node) { return self; }
|
||||
self.body = tighten_body(self.body, compressor);
|
||||
return self;
|
||||
});
|
||||
@@ -1225,6 +1226,7 @@ merge(Compressor.prototype, {
|
||||
var hoist_funs = compressor.option("hoist_funs");
|
||||
var hoist_vars = compressor.option("hoist_vars");
|
||||
var self = this;
|
||||
if (!(self.body instanceof Array)) { return self; } // Hoisting makes no sense in an arrow func
|
||||
if (hoist_funs || hoist_vars) {
|
||||
var dirs = [];
|
||||
var hoisted = [];
|
||||
|
||||
Reference in New Issue
Block a user