[Pkg-javascript-commits] [uglifyjs] 06/11: operator && and || optimization: add "else" before "if" as intended

Jonas Smedegaard dr at jones.dk
Wed Aug 26 09:34:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v2.4.24
in repository uglifyjs.

commit f47b2b52a5642cf7991329a2b635f8f1168dc8c9
Author: kzc <zaxxon2011 at gmail.com>
Date:   Sun Jun 14 17:44:26 2015 -0400

    operator && and || optimization: add "else" before "if" as intended
---
 lib/compress.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/compress.js b/lib/compress.js
index 3423314..343edc4 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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list