Skip to content

Commit

Permalink
fix: fall back to name for formatted groups if display name is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Draconizations committed Jun 12, 2024
1 parent 26ea999 commit ec3ea98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/dash/members/MemberGroups.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/dash/members/edit/MemberGroupEdit.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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 || "")))
Expand Down

0 comments on commit ec3ea98

Please sign in to comment.