File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
1818* [ Refactor] ` propTypes ` : extract type params to var ([ #3634 ] [ ] @HenryBrown0 )
1919* [ Refactor] [ ` boolean-prop-naming ` ] : invert if statement ([ #3634 ] [ ] @HenryBrown0 )
2020* [ Refactor] [ ` function-component-definition ` ] : exit early if no type params ([ #3634 ] [ ] @HenryBrown0 )
21+ * [ Refactor] [ ` jsx-props-no-multi-spaces ` ] : extract type parameters to var ([ #3634 ] [ ] @HenryBrown0 )
2122
2223[ #3638 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3638
2324[ #3634 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3634
Original file line number Diff line number Diff line change @@ -98,8 +98,12 @@ module.exports = {
9898 }
9999
100100 function containsGenericType ( node ) {
101- const containsTypeParams = typeof node . typeParameters !== 'undefined' ;
102- return containsTypeParams && node . typeParameters . type === 'TSTypeParameterInstantiation' ;
101+ const nodeTypeParams = node . typeParameters ;
102+ if ( typeof nodeTypeParams === 'undefined' ) {
103+ return false ;
104+ }
105+
106+ return nodeTypeParams . type === 'TSTypeParameterInstantiation' ;
103107 }
104108
105109 function getGenericNode ( node ) {
You can’t perform that action at this time.
0 commit comments