The object at path.node.param is null for the below code, as it intends to refer to the (err) part of some catch (err) {} clause.
The call t.addDeclaration(path.node.param.name) will fail with TypeError: Cannot read properties of null (reading 'name'), this commit resolve this issue.
//...
try {
// ...
} catch { // note: not using `catch (err) {`
// ...
}
The object at
path.node.param
isnull
for the below code, as it intends to refer to the(err)
part of somecatch (err) {}
clause. The callt.addDeclaration(path.node.param.name)
will fail withTypeError: Cannot read properties of null (reading 'name')
, this commit resolve this issue.