aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js
index bd017e10..efa8e988 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -965,15 +965,15 @@ merge(Compressor.prototype, {
CHANGED = true;
stat = stat.clone();
stat.condition = stat.condition.negate(compressor);
+ var funs = extract_functions_from_statement_array(ret);
var body = as_statement_array(stat.alternative).concat(ret);
- var funs = extract_functions_from_statement_array(body);
stat.body = make_node(AST_BlockStatement, stat, {
body: body
});
stat.alternative = value ? make_node(AST_SimpleStatement, value, {
body: value.expression
}) : null;
- ret = funs.concat([ stat.transform(compressor) ]);
+ ret = [ stat.transform(compressor) ].concat(funs);
continue loop;
}
//---