From f122fc44d06c8594eb31200f9b0e8c6219087992 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Sat, 19 Jan 2019 12:03:12 -0500 Subject: [PATCH] fix: #7266 body does not contain skin class A regression was identified where the skin was not shown in the body class. This resolves the issue and adds a workaround so that the fix does not become breaking for custom themes. --- src/middleware/header.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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,