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 {
13
13
14
14
if ( ! this . props . children ) {
15
15
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
-
21
16
} 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
+ }
27
21
28
22
} ) ;
29
23
You can’t perform that action at this time.
0 commit comments