fix uncovered branch in destructuring

This commit is contained in:
Sebastian McKenzie
2014-10-13 14:55:36 +11:00
parent d76ef98f08
commit 0859d0a122

View File

@@ -85,7 +85,6 @@ exports.ForOfStatement = function (node, parent, file) {
};
exports.Function = function (node, parent, file) {
var block = node.body;
var nodes = [];
var hasDestructuring = false;
@@ -100,8 +99,11 @@ exports.Function = function (node, parent, file) {
});
if (!hasDestructuring) return;
util.ensureBlock(node);
block.body = nodes.concat(block.body || []);
var block = node.body;
block.body = nodes.concat(block.body);
};
exports.ExpressionStatement = function (node, parent, file) {