From: Mihai Bazon Date: Fri, 31 Jan 2014 08:44:13 +0000 (+0200) Subject: Fix if_return dropping the alternative. Close #413 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5344b7dab897fe266db9524a99529d6b64e9386e;p=UglifyJS.git Fix if_return dropping the alternative. Close #413 --- diff --git a/lib/compress.js b/lib/compress.js index 7df66938..1b6bedd5 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -376,7 +376,7 @@ merge(Compressor.prototype, { stat = stat.clone(); stat.condition = stat.condition.negate(compressor); stat.body = make_node(AST_BlockStatement, stat, { - body: ret + body: as_statement_array(stat.alternative).concat(ret) }); stat.alternative = make_node(AST_BlockStatement, stat, { body: body