diff --git a/src/scope.ts b/src/scope.ts index e97d567b..5e4c6df4 100644 --- a/src/scope.ts +++ b/src/scope.ts @@ -209,7 +209,7 @@ export default function scopePlugin(fork: Fork) { } } if (ScopeType.check(node)) { - if (namedTypes.CatchClause.check(node)) { + if (namedTypes.CatchClause.check(node) && node.param !== null) { // A catch clause establishes a new scope but the only variable // bound in that scope is the catch parameter. Any other // declarations create bindings in the outer scope.