We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c932e0 commit 0f4f518Copy full SHA for 0f4f518
lib/rules/jsx-no-leaked-render.js
@@ -61,7 +61,7 @@ function ruleFixer(context, fixStrategy, fixer, reportedNode, leftNode, rightNod
61
if (isParenthesized(context, node)) {
62
nodeText = `(${nodeText})`;
63
}
64
- if(node.parent.type === 'ConditionalExpression' && node.parent.consequent.value === false) {
+ if(node.parent && node.parent.type === 'ConditionalExpression' && node.parent.consequent.value === false) {
65
return `${getIsCoerceValidNestedLogicalExpression(node) ? '' : '!'}${nodeText}`;
66
67
return `${getIsCoerceValidNestedLogicalExpression(node) ? '' : '!!'}${nodeText}`;
0 commit comments