File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,14 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
13
13
* [ ` jsx-key ` ] : catch key errors inside conditional statements ([ #3320 ] [ ] @TildaDares )
14
14
* [ ` display-name ` ] : Accept forwardRef and Memo nesting in newer React versions ([ #3321 ] [ ] @TildaDares )
15
15
* [ ` jsx-key ` ] : avoid a crash from optional chaining from [ #3320 ] [ ] ([ #3327 ] [ ] @ljharb )
16
+ * [ ` jsx-key ` ] : avoid a crash on a non-array node.body from [ #3320 ] [ ] ([ #3328 ] [ ] @ljharb )
16
17
17
18
### Changed
18
19
* [ Refactor] [ ` jsx-indent-props ` ] : improved readability of the checkNodesIndent function ([ #3315 ] [ ] @caroline223 )
19
20
* [ Tests] [ ` jsx-indent ` ] , [ ` jsx-one-expression-per-line ` ] : add passing test cases ([ #3314 ] [ ] @ROSSROSALES )
20
21
* [ Refactor] ` boolean-prop-naming ` , ` jsx-indent ` : avoid assigning to arguments ([ #3316 ] [ ] @caroline223 )
21
22
23
+ [ #3328 ] : https://github.com/jsx-eslint/eslint-plugin-react/issues/3328
22
24
[ #3327 ] : https://github.com/jsx-eslint/eslint-plugin-react/issues/3327
23
25
[ #3321 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3321
24
26
[ #3320 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3320
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ module.exports = {
95
95
if ( node . alternate ) {
96
96
getReturnStatements ( node . alternate , returnStatements ) ;
97
97
}
98
- } else if ( node . body ) {
98
+ } else if ( Array . isArray ( node . body ) ) {
99
99
node . body . forEach ( ( item ) => {
100
100
if ( item . type === 'IfStatement' ) {
101
101
getReturnStatements ( item , returnStatements ) ;
You can’t perform that action at this time.
0 commit comments