Skip to content

Commit

Permalink
use SpreadProperty type, revert other transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Aug 15, 2015
1 parent f5d9f37 commit d75bf7e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions acorn-to-esprima.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,8 @@ var astTransformVisitor = {
},
exit: function (node) { /* parent */
if (this.isSpreadProperty()) {
node.type = "Property";
node.kind = "init";
node.computed = true;
node.type = "SpreadProperty";
node.key = node.value = node.argument;
delete node.argument;
}

if (this.isRestElement()) {
Expand Down

0 comments on commit d75bf7e

Please sign in to comment.