From c3272823634e851ba3bbc88c6e50c865036646d0 Mon Sep 17 00:00:00 2001 From: Kirk Waiblinger Date: Fri, 26 Apr 2024 17:59:11 -0600 Subject: [PATCH] format --- lib/rules/no-extra-boolean-cast.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rules/no-extra-boolean-cast.js b/lib/rules/no-extra-boolean-cast.js index 4f911bf0168..663aadce944 100644 --- a/lib/rules/no-extra-boolean-cast.js +++ b/lib/rules/no-extra-boolean-cast.js @@ -155,7 +155,8 @@ module.exports = { // Check the right hand side of a `??` operator. if ( - node.parent.type === "LogicalExpression" && node.parent.operator === "??" && + node.parent.type === "LogicalExpression" && + node.parent.operator === "??" && node.parent.right === node ) { return isInFlaggedContext(node.parent);