aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2014-01-31 10:44:13 +0200
committerMihai Bazon <mihai@bazon.net>2014-01-31 10:44:13 +0200
commit5344b7dab897fe266db9524a99529d6b64e9386e (patch)
tree00063b60addbc410debd668ad254442c35889e5b
parent0007a53b9ce30c6195364fa7c41ba3bfe593f7c2 (diff)
downloadtracifyjs-5344b7dab897fe266db9524a99529d6b64e9386e.tar.gz
tracifyjs-5344b7dab897fe266db9524a99529d6b64e9386e.zip
Fix if_return dropping the alternative. Close #413
-rw-r--r--lib/compress.js2
1 files changed, 1 insertions, 1 deletions
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