arrows fix for object literal methods containing arguments (#2632)
fixes #2631
This commit is contained in:
@@ -5414,6 +5414,8 @@ merge(Compressor.prototype, {
|
||||
// p(){return x;} ---> p:()=>x
|
||||
if (compressor.option("arrows")
|
||||
&& compressor.parent() instanceof AST_Object
|
||||
&& !self.value.uses_arguments
|
||||
&& !self.value.uses_eval
|
||||
&& self.value.body.length == 1
|
||||
&& self.value.body[0] instanceof AST_Return
|
||||
&& self.value.body[0].value
|
||||
|
||||
Reference in New Issue
Block a user