Skip to content

Commit 2849ab3

Browse files
committed
[Fix] jsx-key: only check full argument when not LogicalExpression with JSX
1 parent 7b2bcab commit 2849ab3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rules/jsx-key.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ module.exports = {
148148
.filter((returnStatement) => returnStatement && returnStatement.argument)
149149
.forEach((returnStatement) => {
150150
const argument = returnStatement.argument;
151-
checkIteratorElement(returnStatement.argument);
152151
if (argument.type === 'LogicalExpression' && isJSX(argument.right)) {
153152
checkIteratorElement(argument.right);
153+
} else {
154+
checkIteratorElement(argument);
155+
154156
}
155157
});
156158
}

0 commit comments

Comments
 (0)