Justin Ridgewell
de1431e8c6
Replace arrow expression body with block statement
...
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(...));
}
```
2016-02-20 04:36:40 -05:00
..
2016-02-12 11:29:58 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-20 04:36:40 -05:00
2016-02-14 23:58:37 +00:00
2016-02-14 23:25:14 +00:00
2016-02-15 00:00:44 +00:00
2016-02-14 23:58:37 +00:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-17 15:26:58 -05:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-12 11:29:58 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-12 11:29:58 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-12 11:29:58 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-19 08:47:17 -05:00
2016-02-06 19:06:41 -05:00
2016-02-12 11:29:58 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-12 11:29:58 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:25:14 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-13 22:56:03 -08:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-16 00:30:54 +06:00
2016-02-06 19:06:41 -05:00
2016-02-12 11:29:58 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-15 00:20:19 +00:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-06 19:06:41 -05:00
2016-02-14 23:13:48 +00:00
2016-02-09 15:28:17 +06:00
2016-02-14 23:25:14 +00:00
2016-02-20 04:36:40 -05:00
2016-02-14 23:25:14 +00:00
2016-02-14 23:26:30 +00:00
2015-10-29 17:51:24 +00:00