diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-11-18 17:11:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 01:11:28 +0800 |
commit | fd6544b34011a30bd869d2447b744fe51d0d741f (patch) | |
tree | 00302bd48b62f43057e1e4f0244727d188113112 /lib/compress.js | |
parent | f6a83f794456c65ba927c0ccf55ff88c5c003a66 (diff) | |
download | tracifyjs-fd6544b34011a30bd869d2447b744fe51d0d741f.tar.gz tracifyjs-fd6544b34011a30bd869d2447b744fe51d0d741f.zip |
fix corner case `reduce_vars` (#4300)
fixes #4297
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index 49c1572d..0f1342f7 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -681,6 +681,7 @@ merge(Compressor.prototype, { && can_drop_symbol(sym) && safe_to_assign(tw, d)) { push_ref(d, sym); mark(tw, d); + if (d.single_use && left instanceof AST_Destructured) d.single_use = false; tw.loop_ids[d.id] = tw.in_loop; mark_escaped(tw, d, sym.scope, node, node.right, 0, 1); sym.fixed = d.fixed = fixed; |