diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-07-31 01:05:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-31 08:05:09 +0800 |
commit | ee632a5519078ac3fe97d0864731bea4bdad9365 (patch) | |
tree | e6b8469bcec072d98849c2dca8ce3545011db2db /lib/compress.js | |
parent | dfe47bcc42d0385577ecffa7fe312025e1369e7b (diff) | |
download | tracifyjs-ee632a5519078ac3fe97d0864731bea4bdad9365.tar.gz tracifyjs-ee632a5519078ac3fe97d0864731bea4bdad9365.zip |
fix corner case in `reduce_vars` (#4031)
fixes #4030
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index d439ed4c..792d5ab2 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -587,7 +587,10 @@ merge(Compressor.prototype, { d.assignments++; var fixed = d.fixed; var value = eq ? node.right : node; - if (is_modified(compressor, tw, node, value, 0)) return; + if (is_modified(compressor, tw, node, value, 0)) { + d.fixed = false; + return; + } var safe = eq || safe_to_read(tw, d); node.right.walk(tw); if (safe && safe_to_assign(tw, d)) { |