From 6b78189a6675a34084bf2eacc0904d32beee5476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Tue, 20 Feb 2018 16:22:22 +0100 Subject: [PATCH] fix(locales): properly detect & set fallback locale --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 45e5afa..5c105e8 100644 --- a/app.js +++ b/app.js @@ -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