fix corner case in arguments (#4411)

fixes #4410
This commit is contained in:
Alex Lam S.L
2020-12-18 20:53:53 +00:00
committed by GitHub
parent 7d9dad0289
commit 0f55bd92f1
2 changed files with 72 additions and 0 deletions

View File

@@ -9905,6 +9905,7 @@ merge(Compressor.prototype, {
} else if (argname instanceof AST_Destructured) {
argname = null;
} else if (argname && (compressor.has_directive("use strict")
|| fn.name
|| !(fn_parent instanceof AST_Call && index < fn_parent.args.length)
|| !all(fn.argnames, function(argname) {
return !(argname instanceof AST_Destructured);