fix(locales): properly detect & set fallback locale

This commit is contained in:
Benedikt Rötsch
2018-02-20 16:22:22 +01:00
committed by Benedikt Rötsch
parent 0bb53d8295
commit 6b78189a66

4
app.js
View File

@@ -115,8 +115,8 @@ app.use(catchErrors(async function (request, response, next) {
response.locals.currentLocale = defaultLocale
}
if (response.locals.fallbackCode) {
setFallbackLocale(response.locals.fallbackCode)
if (response.locals.currentLocale.fallbackCode) {
setFallbackLocale(response.locals.currentLocale.fallbackCode)
}
// Creates a query string which adds the current credentials to links