fix corner case in properties (#4832)

fixes #4831
This commit is contained in:
Alex Lam S.L
2021-04-01 07:39:51 +01:00
committed by GitHub
parent 1947a21824
commit cea1fb5c58
3 changed files with 83 additions and 2 deletions

View File

@@ -11460,7 +11460,10 @@ merge(Compressor.prototype, {
props = props.map(function(prop) {
return prop.value;
});
if (prop instanceof AST_ObjectMethod && prop.value instanceof AST_Function) {
if (prop instanceof AST_ObjectMethod
&& prop.value instanceof AST_Function
&& !(compressor.parent() instanceof AST_Call)) {
if (prop.value.uses_arguments) break;
props[i] = make_node(AST_Arrow, prop.value, prop.value);
}
return make_node(AST_Sub, this, {