Skip to content

Commit

Permalink
lift the declarations without mutating the node[fix babel#402]
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshshanmugam committed Feb 2, 2017
1 parent ac5eccc commit a5ec76a
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -24,9 +24,7 @@ module.exports = function({ types: t }) {
return;
}

init.node.declarations = init.node.declarations.concat(
firstNode.id
);
init.pushContainer("declarations", t.variableDeclarator(firstNode.id));

body[0].replaceWith(t.assignmentExpression(
"=",
Expand Down

0 comments on commit a5ec76a

Please sign in to comment.