aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-01-01 20:24:30 +0800
committerGitHub <noreply@github.com>2020-01-01 20:24:30 +0800
commit746f5f6c62c113ce89981f70ec5de8c8b78016da (patch)
treea8fc4e98b0d7a8673a845c348031a477c7e84c9c /lib
parentd83d3d741ac8ea41a3776c9ca8d60e752180d420 (diff)
downloadtracifyjs-746f5f6c62c113ce89981f70ec5de8c8b78016da.tar.gz
tracifyjs-746f5f6c62c113ce89981f70ec5de8c8b78016da.zip
fix corner case in `unused` (#3665)
fixes #3664
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 2bbd9704..f3fe8a8e 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -3913,7 +3913,7 @@ merge(Compressor.prototype, {
if (node instanceof AST_Assign) {
if (!in_use || node.left === sym && def.id in fixed_ids && fixed_ids[def.id] !== node) {
value = get_rhs(node);
- if (node.write_only) {
+ if (node.write_only === true) {
value = value.drop_side_effect_free(compressor) || make_node(AST_Number, node, {
value: 0
});