Skip to content

Commit

Permalink
Update packages/eslint-plugin/src/rules/prefer-optional-chain.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Nov 13, 2022
1 parent 1bcc7f7 commit 27a22ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/prefer-optional-chain.ts
Expand Up @@ -224,6 +224,7 @@ export default util.createRule({
let operator = previous.right.operator;
if (
previous.right.operator === '!==' &&
// TODO(#4820): Use the type checker to know whether this is `null`
previous.right.right.type === AST_NODE_TYPES.Literal &&
previous.right.right.raw === 'null'
) {
Expand Down

0 comments on commit 27a22ae

Please sign in to comment.