diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-05-31 05:18:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-31 12:18:27 +0800 |
commit | 06ba4e2ce806a7dbf7a16391a36955ab5b3a25bb (patch) | |
tree | 6eca3f59af5736d3e55c30d5bf789c1c5b21e117 /lib/compress.js | |
parent | 0eb4577a82437a82bd88bfeef4ecc761cc66c861 (diff) | |
download | tracifyjs-06ba4e2ce806a7dbf7a16391a36955ab5b3a25bb.tar.gz tracifyjs-06ba4e2ce806a7dbf7a16391a36955ab5b3a25bb.zip |
fix corner case in `arguments` (#3939)
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index 07916323..adae9338 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -8322,7 +8322,8 @@ merge(Compressor.prototype, { var argname = fn.argnames[index]; if (def.deleted && def.deleted[index]) { argname = null; - } else if (argname && compressor.has_directive("use strict")) { + } else if (argname && (compressor.has_directive("use strict") + || !(fn_parent instanceof AST_Call && index < fn_parent.args.length))) { var arg_def = argname.definition(); if (!compressor.option("reduce_vars") || def.reassigned |