aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-10 20:17:39 +0000
committerGitHub <noreply@github.com>2021-01-11 04:17:39 +0800
commit16b97f9558e07ae95ea7c414e926d697c2521d60 (patch)
treee6694faf720f177acef966a78b6a5e235e310603 /lib/compress.js
parentdbfa5d4d14c1984da94c2435f349ecbd3dbb36e9 (diff)
downloadtracifyjs-16b97f9558e07ae95ea7c414e926d697c2521d60.tar.gz
tracifyjs-16b97f9558e07ae95ea7c414e926d697c2521d60.zip
fix corner case in `arguments` (#4535)
fixes #4534
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compress.js b/lib/compress.js
index f8cf75f1..5526972f 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -10463,9 +10463,9 @@ merge(Compressor.prototype, {
argname = null;
} else if (argname) {
var arg_def;
- if (!(argname instanceof AST_SymbolFunarg)) {
- argname = null;
- } else if (expr.scope.find_variable(argname.name) !== (arg_def = argname.definition())) {
+ if (!(argname instanceof AST_SymbolFunarg)
+ || argname.name == "await"
+ || expr.scope.find_variable(argname.name) !== (arg_def = argname.definition())) {
argname = null;
} else if (compressor.has_directive("use strict")
|| fn.name