From 8df33e65ac62c996f55c3085d30403f1ee38f042 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Sun, 2 Mar 2014 22:10:57 -0500 Subject: [PATCH] fixing bug in topics causing meta tags to revert on subsequent refresh --- src/controllers/topics.js | 6 ++---- src/middleware/middleware.js | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/controllers/topics.js b/src/controllers/topics.js index 3b975b673f..bb457ccea2 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -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; @@ -140,7 +137,8 @@ topicsController.get = function(req, res, next) { href: nconf.get('url') + '/category/' + topicData.category.slug } ]; - + + next(null, topicData); } ], function (err, posts) { if (err) { diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index b3cc261f84..b872466641 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -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') {