diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-17 05:51:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 13:51:34 +0800 |
commit | 75e9fd84174eaa8bf97975ad254fe06958564547 (patch) | |
tree | 4a3133a43cf7a04362b3ef8ba33ba6d57db06576 /lib | |
parent | f68e267830c94f129df4c9e93674abfafbc0125b (diff) | |
download | tracifyjs-75e9fd84174eaa8bf97975ad254fe06958564547.tar.gz tracifyjs-75e9fd84174eaa8bf97975ad254fe06958564547.zip |
fix corner case in `arguments` (#4387)
fixes #4386
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index b767264c..a46cd42b 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -9843,6 +9843,8 @@ merge(Compressor.prototype, { var argname = fn.argnames[index]; if (def.deleted && def.deleted[index]) { argname = null; + } else if (argname instanceof AST_Destructured) { + argname = null; } else if (argname && (compressor.has_directive("use strict") || !(fn_parent instanceof AST_Call && index < fn_parent.args.length))) { var arg_def = argname.definition(); |