Skip to content

Commit

Permalink
fix: #7266 body does not contain skin class
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
julianlam committed Jan 19, 2019
1 parent d928c54 commit f122fc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/middleware/header.js
Expand Up @@ -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,
Expand Down

0 comments on commit f122fc4

Please sign in to comment.