public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18270dd
)
it's safe to negate expression in !EXP only in boolean context
author
Mihai Bazon
<mihai@bazon.net>
Thu, 1 Nov 2012 13:49:05 +0000
(15:49 +0200)
committer
Mihai Bazon
<mihai@bazon.net>
Thu, 1 Nov 2012 13:49:05 +0000
(15:49 +0200)
#kendo
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
04fb785
..
5ceef20
100644
(file)
--- a/
lib/compress.js
+++ b/
lib/compress.js
@@
-1446,9
+1446,9
@@
merge(Compressor.prototype, {
compressor.warn("Boolean expression always true [{file}:{line},{col}]", self.start);
return make_node(AST_True, self);
}
- }
- if (e instanceof AST_Binary && self.operator == "!") {
- self = best_of(self, e.negate(compressor));
+ if (e instanceof AST_Binary && self.operator == "!") {
+ self = best_of(self, e.negate(compressor));
+ }
}
return self.evaluate(compressor)[0];
});