diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-08-28 19:42:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-29 02:42:17 +0800 |
commit | f886b3fb2bad77ca7158057b48add16050ceca2a (patch) | |
tree | e2e9b7ff9772b34f88c32151a68d682c204ca72c /lib | |
parent | b1cc15e85bf57042fc390c58f2b513304f8543c6 (diff) | |
download | tracifyjs-f886b3fb2bad77ca7158057b48add16050ceca2a.tar.gz tracifyjs-f886b3fb2bad77ca7158057b48add16050ceca2a.zip |
fix corner case in `loops` & `unused` (#4083)
fixes #4082
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index 90dd0f27..bab390cf 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -4800,7 +4800,7 @@ merge(Compressor.prototype, { return true; } if (node instanceof AST_ForIn) { - if (!compressor.option("loops")) return; + if (!drop_vars || !compressor.option("loops")) return; if (!is_empty(node.body)) return; if (node.init.has_side_effects(compressor)) return; node.object.walk(tw); |