Skip to content

Commit 0f4f518

Browse files
committed
chore: fix test error
1 parent 0c932e0 commit 0f4f518

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
@@ -61,7 +61,7 @@ function ruleFixer(context, fixStrategy, fixer, reportedNode, leftNode, rightNod
6161
if (isParenthesized(context, node)) {
6262
nodeText = `(${nodeText})`;
6363
}
64-
if(node.parent.type === 'ConditionalExpression' && node.parent.consequent.value === false) {
64+
if(node.parent && node.parent.type === 'ConditionalExpression' && node.parent.consequent.value === false) {
6565
return `${getIsCoerceValidNestedLogicalExpression(node) ? '' : '!'}${nodeText}`;
6666
}
6767
return `${getIsCoerceValidNestedLogicalExpression(node) ? '' : '!!'}${nodeText}`;

0 commit comments

Comments
 (0)