From ee632a5519078ac3fe97d0864731bea4bdad9365 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 31 Jul 2020 01:05:09 +0100 Subject: fix corner case in `reduce_vars` (#4031) fixes #4030 --- lib/compress.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/compress.js') 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)) { -- cgit v1.2.3