Skip to content

Commit 346df45

Browse files
committed
chore: use alternateVal
1 parent 3c2dece commit 346df45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/jsx-no-leaked-render.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function ruleFixer(context, fixStrategy, fixer, reportedNode, leftNode, rightNod
7373
if (rightNode.parent.test && rightNode.parent.test.type === 'LogicalExpression') {
7474
return fixer.replaceText(reportedNode, `${newText} ? ${consequentVal} : ${alternateVal}`);
7575
}
76-
return fixer.replaceText(reportedNode, `${newText} && ${rightNode.parent.alternate.name}`);
76+
return fixer.replaceText(reportedNode, `${newText} && ${alternateVal}`);
7777
}
7878

7979
if (rightNode.type === 'ConditionalExpression') {

0 commit comments

Comments
 (0)