Skip to content

Commit

Permalink
Update rules/prefer-catch.js
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Good <[email protected]>
  • Loading branch information
brettz9 and scagood committed Oct 16, 2024
1 parent bfe6a9e commit eb1b113
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rules/prefer-catch.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ module.exports = {
return {
'CallExpression > MemberExpression.callee'(node) {
if (
node.property &&
node.property.name === 'then' &&
node.property?.name === 'then' &&
node.parent.arguments.length >= 2
) {
context.report({
Expand Down

0 comments on commit eb1b113

Please sign in to comment.