Merge pull request #2908 from phantom10111/fix-async-to-generator

Set the correct node type in helper-remap-async-to-generator - fixes #2744
This commit is contained in:
Henry Zhu 2015-11-07 18:11:44 -05:00
commit dd13a585a1

View File

@ -62,6 +62,8 @@ function plainFunction(path: NodePath, callId: Object) {
let retFunction = container.body.body[1].argument;
if (path.isFunctionDeclaration()) {
node.type = "FunctionExpression";
let declar = t.variableDeclaration("let", [
t.variableDeclarator(
t.identifier(asyncFnId.name),