Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jan 14, 2020
1 parent 17ef3fc commit 07c6f32
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/regenerator-transform/src/visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ exports.getVisitor = ({ types: t }) => ({
}

if (node.async) {
// Rename any locally declared "Promise" variable,
// to use the global one.
let currentScope = path.scope;
do {
if (currentScope.hasOwnBinding("Promise")) currentScope.rename("Promise");
Expand Down

0 comments on commit 07c6f32

Please sign in to comment.