Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Commit a653e20

Browse files
authored
Fix optional catch binding
1 parent 2d05b16 commit a653e20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/attachScopes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const attachScopes: AttachScopes = function attachScopes(ast, propertyName = 'sc
100100
if (node.type === 'CatchClause') {
101101
newScope = new Scope({
102102
parent: scope,
103-
params: [node.param],
103+
params: node.param ? [node.param] : undefined,
104104
block: true
105105
});
106106
}

0 commit comments

Comments
 (0)