Skip to content

Commit

Permalink
Fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jan 14, 2020
1 parent 484b0e1 commit 0b6e891
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/regenerator-transform/src/visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ exports.getVisitor = ({ types: t }) => ({

if (node.generator) {
wrapArgs.push(outerFnExpr);
} else if (context.usesThis || tryLocsList) {
} else if (context.usesThis || tryLocsList || node.async) {
// Async functions that are not generators don't care about the
// outer function because they don't need it to be marked and don't
// inherit from its .prototype.
wrapArgs.push(t.nullLiteral());
}
if (context.usesThis) {
wrapArgs.push(t.thisExpression());
} else if (tryLocsList) {
} else if (tryLocsList || node.async) {
wrapArgs.push(t.nullLiteral());
}
if (tryLocsList) {
Expand Down

0 comments on commit 0b6e891

Please sign in to comment.