aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-11-19 22:23:37 +0000
committerGitHub <noreply@github.com>2020-11-20 06:23:37 +0800
commit1b579779be52116a029622156c0217ef33b95f86 (patch)
treed2a1fb5ae56b9e93a629ca38c1c4a95a23f11b46 /lib
parentb18b70f63bce53f1e19ad53c35cef6860b736ea6 (diff)
downloadtracifyjs-1b579779be52116a029622156c0217ef33b95f86.tar.gz
tracifyjs-1b579779be52116a029622156c0217ef33b95f86.zip
fix corner case in `collapse_vars` (#4309)
fixes #4308
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 90488807..601f39f0 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1825,7 +1825,11 @@ merge(Compressor.prototype, {
name: sym,
value: arg
}));
- if (sym instanceof AST_Destructured) continue;
+ if (sym instanceof AST_Destructured) {
+ if (!sym.match_symbol(return_false)) continue;
+ candidates.length = 0;
+ break;
+ }
if (sym.name in names) continue;
names[sym.name] = true;
if (!arg) {