[build] upgrade eslint to 9.37.0 (#88)
Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88 Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org> Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export interface LocaleData {
|
||||
locale: string;
|
||||
messages: Record<string, string>;
|
||||
locale: string,
|
||||
messages: Record<string, string>,
|
||||
}
|
||||
|
||||
let loadedLocale: LocaleData | undefined;
|
||||
@@ -11,10 +11,10 @@ export function setLocale(locale: LocaleData) {
|
||||
|
||||
export function getLocale(): LocaleData {
|
||||
if (!loadedLocale) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
throw new Error('getLocale() called before any locale has been set');
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
throw new Error("getLocale() called before any locale has been set");
|
||||
} else {
|
||||
return { locale: 'unknown', messages: {} };
|
||||
return { locale: "unknown", messages: {} };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user