aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-05-07 19:34:27 +0100
committerGitHub <noreply@github.com>2021-05-08 02:34:27 +0800
commitee9ceb79ca61c8adb9bbf7e82459ab0bbe3aaced (patch)
treec029ea580ee0f1c5747c58c1bbb3e8dcf23f3f5f /lib/compress.js
parentac1f7d689b7dbd6311a6e8eaa633072db9d9703c (diff)
downloadtracifyjs-ee9ceb79ca61c8adb9bbf7e82459ab0bbe3aaced.tar.gz
tracifyjs-ee9ceb79ca61c8adb9bbf7e82459ab0bbe3aaced.zip
fix corner case in `collapse_vars` (#4917)
fixes #4916
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index a9203ce9..fdf46fb9 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1490,7 +1490,7 @@ merge(Compressor.prototype, {
lhs = lhs.fixed_value();
}
if (!lhs) return true;
- if (lhs.is_constant()) return true;
+ if (lhs.tail_node().is_constant()) return true;
return is_lhs_read_only(lhs, compressor);
}
if (lhs instanceof AST_SymbolRef) {