public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5248b79
)
fix compressing UnaryPrefix
author
Mihai Bazon
<mihai@bazon.net>
Thu, 1 Nov 2012 11:35:08 +0000
(13:35 +0200)
committer
Mihai Bazon
<mihai@bazon.net>
Thu, 1 Nov 2012 11:35:08 +0000
(13:35 +0200)
only try negating the expression if the operator is `!`
#kendo
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
ee255d7
..
c3b7611
100644
(file)
--- a/
lib/compress.js
+++ b/
lib/compress.js
@@
-1446,7
+1446,7
@@
merge(Compressor.prototype, {
return make_node(AST_True, self);
}
}
- if (e instanceof AST_Binary) {
+ if (e instanceof AST_Binary
&& self.operator == "!"
) {
self = best_of(self, e.negate(compressor));
}
return self.evaluate(compressor)[0];