Fix bodyless async functions (#4600)
* fix bodyless async functions (#4599) * Do the same in the async-generator-functions transform
This commit is contained in:
committed by
Daniel Tschinder
parent
6d82ee297e
commit
682e9658c9
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user