ci: Fix catch clause lint rule (#5875)

🐛 Fix catch clause lint rule
This commit is contained in:
Iván Ovejero 2023-03-31 19:16:51 +02:00 committed by GitHub
parent 5c9343c7c0
commit 946f7f38ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,7 +155,7 @@ module.exports = {
create(context) {
return {
CatchClause(node) {
if (node.param?.name.startsWith('_')) {
if (node.param?.name?.startsWith('_')) {
const start = node.range[0] + 'catch '.length;
const end = node.param.range[1] + '()'.length;