We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 88f5833 + 444ea9e commit 42777f2Copy full SHA for 42777f2
src/lists/list-item.jsx
@@ -224,8 +224,7 @@ let ListItem = React.createClass({
224
React.Children.forEach(this.props.children, (child) => {
225
if (child === null) return;
226
227
- //consider all element to be nested except literals.
228
- if (React.isValidElement(child)) {
+ if (React.isValidElement(child) && child.type.displayName === 'ListItem') {
229
nestedListItems.push(child);
230
}
231
else {
0 commit comments