Skip to content

Commit

Permalink
fix: render empty mobile group
Browse files Browse the repository at this point in the history
  • Loading branch information
flops committed Dec 17, 2024
1 parent 2d664af commit 9a44622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/MobileLayout/MobileLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class MobileLayout extends React.PureComponent<
const groupId = group.id || DEFAULT_GROUP;
const items = sortedItems[groupId];

const children = items.map((item, index) => {
const children = (items || []).map((item, index) => {
const isItemWithActiveAutoheight =
item.id in this.state.itemsWithActiveAutoheight;

Expand All @@ -78,7 +78,7 @@ export default class MobileLayout extends React.PureComponent<
);
});

indexOffset += items.length;
indexOffset += items?.length || 0;

if (group.render) {
return group.render(groupId, children, {
Expand Down

0 comments on commit 9a44622

Please sign in to comment.