diff --git a/src/middleware/header.js b/src/middleware/header.js index 38e5aa2bb3..65ec79d219 100644 --- a/src/middleware/header.js +++ b/src/middleware/header.js @@ -140,7 +140,9 @@ module.exports = function (middleware) { results.user['email:confirmed'] = results.user['email:confirmed'] === 1; results.user.isEmailConfirmSent = !!results.isEmailConfirmSent; - templateValues.bootswatchSkin = parseInt(meta.config.disableCustomUserSkins, 10) !== 1 ? res.locals.config.bootswatchSkin || '' : ''; + templateValues.bootswatchSkin = (parseInt(meta.config.disableCustomUserSkins, 10) !== 1 ? res.locals.config.bootswatchSkin : '') || meta.config.bootswatchSkin || ''; + templateValues.config.bootswatchSkin = templateValues.bootswatchSkin || 'noskin'; // TODO remove in v1.12.0+ + const unreadCounts = results.unreadData.counts; var unreadCount = { topic: unreadCounts[''] || 0,