From aec4ee53921e2f35b56af52e18dd36a8cf1792c4 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 19 Aug 2015 12:47:57 -0400 Subject: [PATCH] crash fix --- src/middleware/middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 6bab0678e6..e4e5ebbc6f 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -297,7 +297,7 @@ middleware.renderHeader = function(req, res, callback) { templateValues.customCSS = results.customCSS; templateValues.customJS = results.customJS; templateValues.maintenanceHeader = parseInt(meta.config.maintenanceMode, 10) === 1 && !results.isAdmin; - templateValues.defaultLang = res.locals.config.defaultLang; + templateValues.defaultLang = meta.config.defaultLang || 'en_GB'; templateValues.template = {name: res.locals.template}; templateValues.template[res.locals.template] = true;