Skip to content

Commit

Permalink
Merge pull request #350 from mitaai/preview
Browse files Browse the repository at this point in the history
Preview
  • Loading branch information
mbogo-mit authored Dec 8, 2023
2 parents 2287d45 + 2b5f2f8 commit c93afc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/DashboardChannels/DocumentTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default function DocumentTile({
].join(' ');

let tileBadges = [];
const g = groups.slice();
// make sure there are no undefined values
const g = groups.slice().filter((g_item) => g_item);

if (g.length > 0) {
const indexOfSelectedGroup = groups.findIndex((grp) => grp?._id === selectedGroupId);
Expand All @@ -51,6 +52,7 @@ export default function DocumentTile({
}

if (g.length >= maxNumberOfDocumentGroups) {

tileBadges.push(<TileBadge
key="moreGroups"
showPopover={showPopover}
Expand Down

0 comments on commit c93afc0

Please sign in to comment.