From d4b70162e8284d9daaf6ec3029b654c1ef852503 Mon Sep 17 00:00:00 2001 From: Alex Johansson Date: Tue, 2 Nov 2021 17:09:22 +0000 Subject: [PATCH] fix locale being empty string (#1112) --- server/createContext.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/createContext.ts b/server/createContext.ts index ed27e3b2d1..d3357909d9 100644 --- a/server/createContext.ts +++ b/server/createContext.ts @@ -74,7 +74,7 @@ async function getUserFromSession({ } const avatar = user.avatar || defaultAvatarSrc({ email }); - const locale = user.locale ?? getLocaleFromHeaders(req); + const locale = user.locale || getLocaleFromHeaders(req); return { ...user, avatar,