aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-10-03 11:34:05 +0300
committerMihai Bazon <mihai@bazon.net>2012-10-03 11:34:05 +0300
commit0678ae2076a9f817ecb8837279c24cf54ea819c2 (patch)
tree6cd10d41bf915854ac4a345019c326ea40b24f2f /lib
parent378ed178095e8d02b8ceab9d6d8e890eea1ab04d (diff)
downloadtracifyjs-0678ae2076a9f817ecb8837279c24cf54ea819c2.tar.gz
tracifyjs-0678ae2076a9f817ecb8837279c24cf54ea819c2.zip
fix for `a = !b && !c && !d && !e → a=!(b||c||d||e)`
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 41578c14..16812571 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1416,7 +1416,8 @@ merge(Compressor.prototype, {
return exp[0];
}
if (compressor.option("comparisons")) {
- if (!(compressor.parent() instanceof AST_Binary)) {
+ if (!(compressor.parent() instanceof AST_Binary)
+ || compressor.parent() instanceof AST_Assign) {
var negated = make_node(AST_UnaryPrefix, self, {
operator: "!",
expression: self.negate(compressor)