mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
fixing bug in topics causing meta tags to revert on subsequent refresh
This commit is contained in:
@@ -52,7 +52,6 @@ topicsController.get = function(req, res, next) {
|
||||
});
|
||||
},
|
||||
function (topicData, next) {
|
||||
|
||||
var lastMod = topicData.timestamp,
|
||||
description = (function() {
|
||||
var content = '';
|
||||
@@ -75,8 +74,6 @@ topicsController.get = function(req, res, next) {
|
||||
}
|
||||
}
|
||||
|
||||
next(null, topicData);
|
||||
|
||||
var ogImageUrl = meta.config['brand:logo'];
|
||||
if(ogImageUrl && ogImageUrl.indexOf('http') === -1) {
|
||||
ogImageUrl = nconf.get('url') + ogImageUrl;
|
||||
@@ -141,6 +138,7 @@ topicsController.get = function(req, res, next) {
|
||||
}
|
||||
];
|
||||
|
||||
next(null, topicData);
|
||||
}
|
||||
], function (err, posts) {
|
||||
if (err) {
|
||||
|
||||
@@ -165,7 +165,6 @@ middleware.renderHeader = function (options, callback) {
|
||||
};
|
||||
|
||||
var uid = '0';
|
||||
console.log(options.res.locals.metaTags);
|
||||
// Meta Tags
|
||||
templateValues.metaTags = defaultMetaTags.concat(options.res.locals.metaTags || []).map(function(tag) {
|
||||
if(!tag || typeof tag.content !== 'string') {
|
||||
|
||||
Reference in New Issue
Block a user