diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-29 16:22:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 00:22:03 +0800 |
commit | 1956edd503bde9db8e99d8a499d54d5a508f8bb8 (patch) | |
tree | 32b1f05ad7820a1070639ef78ae5caf4fcfd0ac9 /lib/compress.js | |
parent | 560ccc1221639dca9db354ad6830e418a9f0073d (diff) | |
download | tracifyjs-1956edd503bde9db8e99d8a499d54d5a508f8bb8.tar.gz tracifyjs-1956edd503bde9db8e99d8a499d54d5a508f8bb8.zip |
fix corner cases with `arguments` (#4481)
fixes #4480
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/compress.js b/lib/compress.js index 591ad4dd..3ac9e74d 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -357,10 +357,7 @@ merge(Compressor.prototype, { } function is_arguments(def) { - if (def.name != "arguments") return false; - if (!def.scope.uses_arguments) return false; - var orig = def.orig; - return orig.length == 1 && orig[0] instanceof AST_SymbolFunarg; + return def.name == "arguments" && def.scope.uses_arguments; } function is_funarg(def) { |