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:
commit
dd13a585a1
@ -62,6 +62,8 @@ function plainFunction(path: NodePath, callId: Object) {
|
|||||||
let retFunction = container.body.body[1].argument;
|
let retFunction = container.body.body[1].argument;
|
||||||
|
|
||||||
if (path.isFunctionDeclaration()) {
|
if (path.isFunctionDeclaration()) {
|
||||||
|
node.type = "FunctionExpression";
|
||||||
|
|
||||||
let declar = t.variableDeclaration("let", [
|
let declar = t.variableDeclaration("let", [
|
||||||
t.variableDeclarator(
|
t.variableDeclarator(
|
||||||
t.identifier(asyncFnId.name),
|
t.identifier(asyncFnId.name),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user