Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Dec 23, 2019
1 parent 42dd30d commit 31e013e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/babel-traverse/src/scope/index.js
Expand Up @@ -902,14 +902,14 @@ export default class Scope {
do {
const binding = scope.getOwnBinding(name);
if (binding) {
// When a pattern is a Scope, it is a part of parameter expressions.
// Check if a pattern is a part of parameter expressions.
// 9.2.10.28: The closure created by this expression should not have visibility of
// declarations in the function body. If the binding is not a `param`-kind,
// then it must be defined inside the function body, thus it should be skipped
if (
previousPath &&
previousPath.isPattern() &&
previousPath.isScope() &&
previousPath.parentPath.isFunction() &&
binding.kind !== "param"
) {
// do nothing
Expand Down

0 comments on commit 31e013e

Please sign in to comment.