[Pkg-javascript-commits] [uglifyjs] 08/11: Avoid spurious brackets when dropping unused vars

Jonas Smedegaard dr at jones.dk
Tue May 19 00:02:48 UTC 2015


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

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

commit c3a10c135eac6fff360ad109f30245459b0b7e13
Author: Mihai Bazon <mihai.bazon at gmail.com>
Date:   Mon May 4 14:49:17 2015 +0300

    Avoid spurious brackets when dropping unused vars
    
    Fix #702
---
 lib/compress.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/compress.js b/lib/compress.js
index 7d20a4e..944db1d 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1168,12 +1168,12 @@ merge(Compressor.prototype, {
                             return make_node(AST_EmptyStatement, node);
                         }
                         if (def.length == 0) {
-                            return side_effects;
+                            return in_list ? MAP.splice(side_effects.body) : side_effects;
                         }
                         node.definitions = def;
                         if (side_effects) {
                             side_effects.body.unshift(node);
-                            node = side_effects;
+                            return in_list ? MAP.splice(side_effects.body) : side_effects;
                         }
                         return node;
                     }

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