aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-10-22 13:14:15 +0800
committerGitHub <noreply@github.com>2017-10-22 13:14:15 +0800
commit516eaef50c66aede72d3478a5653ae8651806258 (patch)
treed31d47d2c40a8c7e36ec1610e21a8f3ce0856260 /lib/compress.js
parent4ae1fb3ed8380d06220fd242037bd277fc21c17d (diff)
downloadtracifyjs-516eaef50c66aede72d3478a5653ae8651806258.tar.gz
tracifyjs-516eaef50c66aede72d3478a5653ae8651806258.zip
fix `unsafe` evaluation of `AST_Sub` (#2389)
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index cef5d75f..6a40ef2a 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -4468,6 +4468,7 @@ merge(Compressor.prototype, {
});
}
}
+ if (is_lhs(self, compressor.parent())) return self;
var ev = self.evaluate(compressor);
if (ev !== self) {
ev = make_node_from_constant(ev, self).optimize(compressor);