mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 01:10:31 +01:00
fix crash due to hook change
This commit is contained in:
@@ -127,24 +127,24 @@ topicsController.get = function(req, res, callback) {
|
|||||||
plugins.fireHook('filter:controllers.topic.get', {topicData: topicData, uid: req.uid}, next);
|
plugins.fireHook('filter:controllers.topic.get', {topicData: topicData, uid: req.uid}, next);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
function (topicData, next) {
|
function (data, next) {
|
||||||
|
|
||||||
var breadcrumbs = [
|
var breadcrumbs = [
|
||||||
{
|
{
|
||||||
text: topicData.category.name,
|
text: data.topicData.category.name,
|
||||||
url: nconf.get('relative_path') + '/category/' + topicData.category.slug
|
url: nconf.get('relative_path') + '/category/' + data.topicData.category.slug
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: topicData.title
|
text: data.topicData.title
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
helpers.buildCategoryBreadcrumbs(topicData.category.parentCid, function(err, crumbs) {
|
helpers.buildCategoryBreadcrumbs(data.topicData.category.parentCid, function(err, crumbs) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
topicData.breadcrumbs = crumbs.concat(breadcrumbs);
|
data.topicData.breadcrumbs = crumbs.concat(breadcrumbs);
|
||||||
next(null, topicData);
|
next(null, data.topicData);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
function (topicData, next) {
|
function (topicData, next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user