Node.js based forum software built for the modern web
fix: broken test for meta tags on ajaxify
Julian Lamb70e03a7b0f6
diff --git a/src/middleware/header.js b/src/middleware/header.jsindex b347723ddb..8e26934560 100644--- a/src/middleware/header.js+++ b/src/middleware/header.js@@ -179,8 +179,6 @@ module.exports = function (middleware) {templateValues.browserTitle = results.browserTitle;templateValues.navigation = results.navigation;templateValues.unreadCount = unreadCount;- templateValues.metaTags = data._header.tags.meta;- templateValues.linkTags = data._header.tags.link;templateValues.isAdmin = results.user.isAdmin;templateValues.isGlobalMod = results.user.isGlobalMod;templateValues.showModMenu = results.user.isAdmin || results.user.isGlobalMod || results.user.isMod;@@ -199,6 +197,11 @@ module.exports = function (middleware) {templateValues.template = { name: res.locals.template };templateValues.template[res.locals.template] = true;+ if (data.hasOwnProperty('_header')) {+ templateValues.metaTags = data._header.tags.meta;+ templateValues.linkTags = data._header.tags.link;+ }+if (req.route && req.route.path === '/') {modifyTitle(templateValues);}