fix for topics without category data (?)

@barisusakli lemme know if this is legit, if not, see line 195 as well
v1.18.x
psychobunny 11 years ago
parent 8b64e65095
commit 2b90add560

@ -201,17 +201,20 @@ topicsController.get = function(req, res, next) {
rel: 'alternate',
type: 'application/rss+xml',
href: nconf.get('url') + '/topic/' + tid + '.rss'
},
{
rel: 'up',
href: nconf.get('url') + '/category/' + topicData.category.slug
},
}
{
rel: 'canonical',
href: nconf.get('url') + '/topic/' + topicData.slug
}
];
if (topicData.category) {
res.locals.linkTags.push({
rel: 'up',
href: nconf.get('url') + '/category/' + topicData.category.slug
});
}
next(null, topicData);
}
], function (err, data) {

Loading…
Cancel
Save