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 authored Oct 16, 2024
1 parent ab4c987 commit 40a1de3
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 40a1de3

Please sign in to comment.