Wizard: edit the timezone filter to fix whitespaces

This commit is contained in:
Katarina Sieklova 2025-06-03 15:09:52 +02:00 committed by Anna Vítová
parent 6c244ba09e
commit 3093310a6c

View file

@ -43,10 +43,14 @@ const TimezoneDropDown = () => {
const normalizedFilter = filterValue
.toLowerCase()
.replace(/[_/]/g, ' ')
.replace(/\s+/g, ' ')
.trim();
filteredTimezones = timezones.filter((timezone: string) => {
const normalizedTimezone = timezone.toLowerCase().replace(/[_/]/g, ' ');
const normalizedTimezone = timezone
.toLowerCase()
.replace(/[_/]/g, ' ')
.replace(/\s+/g, ' ');
return normalizedTimezone.includes(normalizedFilter);
});