fix: set default locale if preferred locale is not supported

pull/712/head
mihaic195 2021-09-22 21:45:54 +03:00
parent 15e23d7f26
commit e2a3d81371
No known key found for this signature in database
GPG Key ID: 8EA549D54350CC73
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ export const extractLocaleInfo = async (req: IncomingMessage) => {
id: session.user.id,
},
data: {
locale: preferredLocale,
locale: preferredLocale ? preferredLocale : i18n.defaultLocale,
},
});
}