From ec3ea983b91b18217954916765581d42d49913aa Mon Sep 17 00:00:00 2001 From: Jake Fulmine Date: Wed, 12 Jun 2024 02:31:24 +0200 Subject: [PATCH] fix: fall back to name for formatted groups if display name is empty --- src/components/dash/members/MemberGroups.svelte | 2 +- src/components/dash/members/edit/MemberGroupEdit.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/dash/members/MemberGroups.svelte b/src/components/dash/members/MemberGroups.svelte index 2846a33..f76013e 100644 --- a/src/components/dash/members/MemberGroups.svelte +++ b/src/components/dash/members/MemberGroups.svelte @@ -36,7 +36,7 @@ let formattedGroups: string = $derived( groups.length <= 5 ? groups.map((g) => `[\`${g.id}\`] ${g.display_name || g.name}`).join("\n") - : groups.map((g) => g.display_name).join(", ") + : groups.map((g) => g.display_name || g.name).join(", ") ) let itemsPerPage = 5 diff --git a/src/components/dash/members/edit/MemberGroupEdit.svelte b/src/components/dash/members/edit/MemberGroupEdit.svelte index b7fe95a..eb835b1 100644 --- a/src/components/dash/members/edit/MemberGroupEdit.svelte +++ b/src/components/dash/members/edit/MemberGroupEdit.svelte @@ -74,7 +74,7 @@ let formattedGroups = $derived( groupSelection.length <= 5 ? groupSelection.map((g) => `[\`${g.id}\`] ${g.display_name || g.name}`).join("\n") - : groupSelection.map((g) => g.display_name).join(", ") + : groupSelection.map((g) => g.display_name || g.name).join(", ") ) let added = $derived(groupSelection.filter((g) => !uuidsCurrent.includes(g.uuid || "")))