Original PR: https://github.com/babel/babel/pull/2469. Seems this got lost in the v6 changes. - - - Without this, the only way to replace the arrow function is to either manually override its `node.body`, or duplicate the arrow: ```js // Old ArrowFunctionExpression: function (node) { node.body = t.blockStatement(...); // Or return t.ArrowFunctionExpression( node.params, t.blockStatement(...), node.async ); } // New ArrowFunctionExpression: function() { this.get("body").replaceWith(t.blockStatement(...)); } ```
4.2 KiB
4.2 KiB