Fix bodyless async functions (#4600)

* fix bodyless async functions (#4599)

* Do the same in the async-generator-functions transform
This commit is contained in:
Dan Harper
2016-09-29 11:01:37 +01:00
committed by Daniel Tschinder
parent 6d82ee297e
commit 682e9658c9
4 changed files with 12 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ export default function ({ types: t }) {
Function(path, state) {
if (!path.node.async || !path.node.generator) return;
path.get("body").traverse(yieldStarVisitor, state);
path.traverse(yieldStarVisitor, state);
remapAsyncToGenerator(path, state.file, {
wrapAsync: t.memberExpression(