File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ module.exports = {
113
113
* @returns {Object[] } Array of PropType object representations, to be consumed by `addPropTypesToComponent`.
114
114
*/
115
115
function getPropTypesFromObjectExpression ( objectExpression ) {
116
- const props = objectExpression . properties . filter ( property => property . type !== 'ExperimentalSpreadProperty' ) ;
116
+ const props = objectExpression . properties . filter ( property => property . type !== 'ExperimentalSpreadProperty' && property . type !== 'SpreadElement' ) ;
117
117
118
118
return props . map ( property => ( {
119
119
name : sourceCode . getText ( property . key ) . replace ( QUOTES_REGEX , '' ) ,
@@ -184,7 +184,7 @@ module.exports = {
184
184
* from this ObjectExpression can't be resolved.
185
185
*/
186
186
function getDefaultPropsFromObjectExpression ( objectExpression ) {
187
- const hasSpread = objectExpression . properties . find ( property => property . type === 'ExperimentalSpreadProperty' ) ;
187
+ const hasSpread = objectExpression . properties . find ( property => property . type === 'ExperimentalSpreadProperty' || property . type === 'SpreadElement' ) ;
188
188
189
189
if ( hasSpread ) {
190
190
return 'unresolved' ;
@@ -555,7 +555,7 @@ module.exports = {
555
555
556
556
// Search for the proptypes declaration
557
557
node . properties . forEach ( property => {
558
- if ( property . type === 'ExperimentalSpreadProperty' ) {
558
+ if ( property . type === 'ExperimentalSpreadProperty' || property . type === 'SpreadElement' ) {
559
559
return ;
560
560
}
561
561
You can’t perform that action at this time.
0 commit comments