From 30a26ef3ed55d072cd9bf2aea1b200fadc2a05f1 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Tue, 20 May 2025 01:06:42 +0200 Subject: [PATCH] fix(DonationCreate): remove duplicate spaces from getRunnerLabel --- src/components/tools/DonationCreate.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/tools/DonationCreate.svelte b/src/components/tools/DonationCreate.svelte index 5a339884..9fa6cb81 100644 --- a/src/components/tools/DonationCreate.svelte +++ b/src/components/tools/DonationCreate.svelte @@ -52,8 +52,9 @@ } loadDonors(); - const getRunnerLabel = (option) => - option.firstname + " " + (option.middlename || "") + " " + option.lastname+" [#"+option.id+"]"; + const getRunnerLabel = (option) => { + return [option.firstname,option.middlename,option.lastname].join(" ").replace(" "," ") + " [#"+option.id+"]"; + } const filterRunners = (label, filterText, option) => { if (filterText.startsWith("#")) {