Skip to content

Commit

Permalink
refactor: use FunctionParent on visiting var scope (#13152)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Apr 14, 2021
1 parent d24bd7c commit 1e31d41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/babel-helper-hoist-variables/src/index.ts
Expand Up @@ -19,7 +19,7 @@ const visitor = {
if (state.kind === "let") path.skip();
},

Function(path: NodePath) {
FunctionParent(path: NodePath) {
path.skip();
},

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-block-scoping/src/index.js
Expand Up @@ -175,7 +175,7 @@ const letReferenceBlockVisitor = traverse.visitors.merge([
state.loopDepth--;
},
},
Function(path, state) {
FunctionParent(path, state) {
// References to block-scoped variables only require added closures if it's
// possible for the code to run more than once -- otherwise it is safe to
// simply rename the variables.
Expand Down

0 comments on commit 1e31d41

Please sign in to comment.