Transformed generators for async function expressions should not be shadow functions
This commit is contained in:
parent
27a132a9cb
commit
a3bca783dd
@ -62,6 +62,12 @@ function plainFunction(path: NodePath, callId: Object) {
|
||||
|
||||
node.async = false;
|
||||
node.generator = true;
|
||||
// Either the wrapped generator is invoked with `.apply(this, arguments)` or it has no params,
|
||||
// so it should capture `arguments`
|
||||
if (node.shadow) {
|
||||
// node.shadow may be `true` or an object
|
||||
node.shadow = Object.assign({}, node.shadow, { arguments: false });
|
||||
}
|
||||
|
||||
let asyncFnId = node.id;
|
||||
node.id = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user