fix bug where async class methods weren't having their awaits converted to yields in the async to generator helper - fixes #2661

This commit is contained in:
Sebastian McKenzie
2015-11-02 07:05:00 +00:00
parent 41ccee89c9
commit d2d48e9f7f

View File

@@ -46,8 +46,6 @@ function plainFunction(path: NodePath, callId: Object) {
node.async = false;
node.generator = true;
path.traverse(awaitVisitor);
let built = t.callExpression(callId, [node]);
let container = buildWrapper({
FUNCTION: built,
@@ -93,6 +91,8 @@ export default function (path: NodePath, callId: Object) {
let node = path.node;
if (node.generator) return;
path.traverse(awaitVisitor);
if (path.isClassMethod()) {
return classMethod(path, callId);
} else {