aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-12-29 11:43:12 +0000
committerGitHub <noreply@github.com>2020-12-29 19:43:12 +0800
commit560ccc1221639dca9db354ad6830e418a9f0073d (patch)
tree08ba152beaba140cc50a8bcc306bf1907f47e9c2 /lib/compress.js
parent10a71c182bc4b992c91863fe0eb50a1afdae8a6f (diff)
downloadtracifyjs-560ccc1221639dca9db354ad6830e418a9f0073d.tar.gz
tracifyjs-560ccc1221639dca9db354ad6830e418a9f0073d.zip
enhance `reduce_vars` (#4479)
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 0369b63d..591ad4dd 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -771,8 +771,7 @@ merge(Compressor.prototype, {
}
var d = sym.definition();
d.assignments++;
- if (!is_modified(compressor, tw, node, node.right, 0)
- && can_drop_symbol(sym) && safe_to_assign(tw, d)) {
+ if (!is_modified(compressor, tw, node, node.right, 0) && safe_to_assign(tw, d)) {
push_ref(d, sym);
mark(tw, d);
if (d.single_use && left instanceof AST_Destructured) d.single_use = false;