aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-12-18 20:53:53 +0000
committerGitHub <noreply@github.com>2020-12-19 04:53:53 +0800
commit0f55bd92f18bd27628f1cfd10c9fb5d70f4d4d29 (patch)
treedaec0309f0365633f7afedcb0af146814d916769 /lib
parent7d9dad02899fdc0a46ab030f9663e7f5bec2003b (diff)
downloadtracifyjs-0f55bd92f18bd27628f1cfd10c9fb5d70f4d4d29.tar.gz
tracifyjs-0f55bd92f18bd27628f1cfd10c9fb5d70f4d4d29.zip
fix corner case in `arguments` (#4411)
fixes #4410
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index ab68c45d..f33b97bc 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -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);