Skip to content

Commit

Permalink
fix: issue with li
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed Aug 10, 2024
1 parent 722a10f commit cfb9d09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/extractListItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export function extractListItems(children) {

const onlyChild = React.Children.only(children);
const allRows = React.Children.toArray(onlyChild.props.children);
const liRows = allRows.filter(item => item.type?.name === 'MDXLi');
const liRows = allRows.filter(item => {
const name = item.type?.name;
return name === 'MDXLi' || name === 'li';
});

return liRows;
}

0 comments on commit cfb9d09

Please sign in to comment.