From: kzc Date: Sun, 14 Jun 2015 21:44:26 +0000 (-0400) Subject: operator && and || optimization: add "else" before "if" as intended X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f47b2b52a5642cf7991329a2b635f8f1168dc8c9;p=UglifyJS.git operator && and || optimization: add "else" before "if" as intended --- diff --git a/lib/compress.js b/lib/compress.js index 34233143..343edc46 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2118,7 +2118,7 @@ merge(Compressor.prototype, { } } } - if (self.operator == "||") { + else if (self.operator == "||") { var ll = self.left.evaluate(compressor); var rr = self.right.evaluate(compressor); if (ll.length > 1) {