From 9a141a11ed6b8de153b7d6eac1661c23a2f153fe Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Wed, 26 Feb 2025 16:50:05 +0100 Subject: frontend: Use joinText in TagPill We basically already had a function that does what we need here, so there's no need to reimplement it just for TagPill. --- frontend/src/lib/Utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend/src/lib/Utils.ts') diff --git a/frontend/src/lib/Utils.ts b/frontend/src/lib/Utils.ts index c0e5b6c..df7dad8 100644 --- a/frontend/src/lib/Utils.ts +++ b/frontend/src/lib/Utils.ts @@ -93,7 +93,7 @@ export function formatListSize(word: string, size: number) { return `${size} ${pluralize(word, size)}`; } -export function joinText(items: string[], separator = ', ') { +export function joinText(items: (string | undefined | null)[], separator = ', ') { return items.filter((i) => i).join(separator); } -- cgit v1.2.3-2-gb3c3