File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,11 @@ class ListGroup extends React.Component {
1313
1414 if ( ! this . props . children ) {
1515 return this . renderDiv ( items ) ;
16- } else if ( React . Children . count ( this . props . children ) === 1 && ! Array . isArray ( this . props . children ) ) {
17- let child = this . props . children ;
18-
19- childrenAnchors = this . isAnchor ( child . props ) ;
20-
2116 } else {
22-
23- childrenAnchors = Array . prototype . some . call ( this . props . children , ( child ) => {
24- return ! Array . isArray ( child ) ? this . isAnchor ( child . props ) : Array . prototype . some . call ( child , ( subChild ) => {
25- return this . isAnchor ( subChild . props ) ;
26- } ) ;
17+ React . Children . forEach ( this . props . children , ( child ) => {
18+ if ( this . isAnchor ( child . props ) ) {
19+ childrenAnchors = true ;
20+ }
2721
2822 } ) ;
2923
You can’t perform that action at this time.
0 commit comments