Skip to content

Commit 40a1de3

Browse files
brettz9scagood
andauthored
Update rules/prefer-catch.js
Co-authored-by: Sebastian Good <[email protected]>
1 parent ab4c987 commit 40a1de3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: rules/prefer-catch.js

+1-2
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)