aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-22 07:44:16 +0000
committerGitHub <noreply@github.com>2021-02-22 15:44:16 +0800
commitf9a2a9d78e8437d8b9591e97ab280e20b9442b35 (patch)
tree29ce60bf6d3f52abdf93bfe87587389ac92b1301 /lib
parent960668ccdb8a3498ee61387648c457f242cfe29c (diff)
downloadtracifyjs-f9a2a9d78e8437d8b9591e97ab280e20b9442b35.tar.gz
tracifyjs-f9a2a9d78e8437d8b9591e97ab280e20b9442b35.zip
enhance `side_effects` (#4675)
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 0a89de7e..c6451012 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -8516,6 +8516,8 @@ merge(Compressor.prototype, {
}
});
return node;
+ } else if (!node.has_side_effects(compressor)) {
+ self.drop_side_effect_free = return_null;
}
}
var arg_used, insert, in_loop, scope;