fix uncovered branch in destructuring
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user