Fixed double space in label

ref #162
This commit is contained in:
2023-03-15 13:09:07 +01:00
parent 268b1b1d98
commit 92b89cc4d8

View File

@@ -12,8 +12,14 @@
export let modal_open;
export let current_cards;
const getRunnerLabel = (option) =>
option.firstname + " " + (option.middlename || "") + " " + option.lastname;
const getRunnerLabel = (option) =>
{
if(option.middlename){
return option.firstname + " " + option.middlename + " " + option.lastname;
}
return option.firstname + " " + option.lastname;
}
const filterRunners = (label, filterText, option) =>
label.toLowerCase().includes(filterText.toLowerCase()) ||
option.value.toString().startsWith(filterText.toLowerCase());