Fix if_return dropping the alternative. Close #413

This commit is contained in:
Mihai Bazon
2014-01-31 10:44:13 +02:00
parent 0007a53b9c
commit 5344b7dab8

View File

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