fix(web): blank locale cause blank timeline to render (#17284)

* fix(web): blank locale cause blank timeline to render

* correct fix

* newline

* pr feedback
This commit is contained in:
Alex 2025-04-01 13:58:11 -05:00 committed by GitHub
parent 20ba800a50
commit 946507231d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,7 +38,7 @@ export const colorTheme = persisted<ThemeSetting>('color-theme', initialTheme, {
// Locale to use for formatting dates, numbers, etc.
export const locale = persisted<string | undefined>('locale', undefined, {
serializer: {
parse: (text) => text,
parse: (text) => (text == '' ? 'en-US' : text),
stringify: (object) => object ?? '',
},
});