[Pkg-javascript-commits] [uglifyjs] 11/28: Fix parens in +(+x). Close #475

Jonas Smedegaard dr at jones.dk
Thu Oct 16 11:57:30 UTC 2014


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

js pushed a commit to branch master
in repository uglifyjs.

commit 8258edd8a54cd5ed5d15a3a674f2cc716b304aeb
Author: Mihai Bazon <mihai at bazon.net>
Date:   Sun Apr 27 20:51:01 2014 +0300

    Fix parens in +(+x).  Close #475
---
 lib/output.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/output.js b/lib/output.js
index adbc9a4..4a3bfd5 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -455,7 +455,8 @@ function OutputStream(options) {
 
     PARENS(AST_Unary, function(output){
         var p = output.parent();
-        return p instanceof AST_PropAccess && p.expression === this;
+        return (p instanceof AST_PropAccess && p.expression === this)
+            || (p instanceof AST_Unary && p.operator == "+" && this.operator == "+");
     });
 
     PARENS(AST_Seq, function(output){

-- 
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