mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
fix(api): restore commas in geoip location labels (#2812)
This commit is contained in:
@@ -285,6 +285,5 @@ export function formatGeoipLocation(result: GeoipResult, locale?: string | null)
|
||||
const localizedCountry = locale && result.countryCode ? countryDisplayName(result.countryCode, locale) : null;
|
||||
const countryLabel = localizedCountry ?? result.countryName ?? result.countryCode;
|
||||
if (countryLabel) parts.push(countryLabel);
|
||||
if (parts.length === 0) return null;
|
||||
return new Intl.ListFormat(locale ?? 'en', {style: 'narrow', type: 'unit'}).format(parts);
|
||||
return parts.length > 0 ? parts.join(', ') : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user