Skip to content

Scheduling infrastructure for absolutely everyone.

hotfix: missing locale

zomars4f942e1a1353
diff --git a/packages/features/auth/lib/getLocale.ts b/packages/features/auth/lib/getLocale.ts
index cfd494a3f26..ec77edab697 100644
--- a/packages/features/auth/lib/getLocale.ts
+++ b/packages/features/auth/lib/getLocale.ts
@@ -20,7 +20,7 @@ export const getLocale = async (req: GetTokenParams["req"]): Promise<string> =>
const tokenLocale = token?.["locale"];
- if (tokenLocale !== undefined) {
+ if (tokenLocale) {
return tokenLocale;
}
@@ -29,5 +29,5 @@ export const getLocale = async (req: GetTokenParams["req"]): Promise<string> =>
const languages = acceptLanguage ? parse(acceptLanguage) : [];
- return languages[0]?.code ?? "en";
+ return languages[0]?.code || "en";
};