File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Top Open diff view settings Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Top Open diff view settings 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
1313* [ ` jsx-key ` ] : catch key errors inside conditional statements ([ #3320 ] [ ] @TildaDares )
1414* [ ` display-name ` ] : Accept forwardRef and Memo nesting in newer React versions ([ #3321 ] [ ] @TildaDares )
1515* [ ` 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 )
1617
1718### Changed
1819* [ Refactor] [ ` jsx-indent-props ` ] : improved readability of the checkNodesIndent function ([ #3315 ] [ ] @caroline223 )
1920* [ Tests] [ ` jsx-indent ` ] , [ ` jsx-one-expression-per-line ` ] : add passing test cases ([ #3314 ] [ ] @ROSSROSALES )
2021* [ Refactor] ` boolean-prop-naming ` , ` jsx-indent ` : avoid assigning to arguments ([ #3316 ] [ ] @caroline223 )
2122
23+ [ #3328 ] : https://github.com/jsx-eslint/eslint-plugin-react/issues/3328
2224[ #3327 ] : https://github.com/jsx-eslint/eslint-plugin-react/issues/3327
2325[ #3321 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3321
2426[ #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 = {
9595 if ( node . alternate ) {
9696 getReturnStatements ( node . alternate , returnStatements ) ;
9797 }
98- } else if ( node . body ) {
98+ } else if ( Array . isArray ( node . body ) ) {
9999 node . body . forEach ( ( item ) => {
100100 if ( item . type === 'IfStatement' ) {
101101 getReturnStatements ( item , returnStatements ) ;
You can’t perform that action at this time.
0 commit comments