Skip to content

Commit eb1b113

Browse files
brettz9scagood
andcommitted
Update rules/prefer-catch.js
Co-authored-by: Sebastian Good <[email protected]>
1 parent bfe6a9e commit eb1b113

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rules/prefer-catch.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ module.exports = {
2828
return {
2929
'CallExpression > MemberExpression.callee'(node) {
3030
if (
31-
node.property &&
32-
node.property.name === 'then' &&
31+
node.property?.name === 'then' &&
3332
node.parent.arguments.length >= 2
3433
) {
3534
context.report({

0 commit comments

Comments
 (0)