mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +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);
|
||||
});
|
||||
},
|
||||
function (topicData, next) {
|
||||
function (data, next) {
|
||||
|
||||
var breadcrumbs = [
|
||||
{
|
||||
text: topicData.category.name,
|
||||
url: nconf.get('relative_path') + '/category/' + topicData.category.slug
|
||||
text: data.topicData.category.name,
|
||||
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) {
|
||||
return next(err);
|
||||
}
|
||||
topicData.breadcrumbs = crumbs.concat(breadcrumbs);
|
||||
next(null, topicData);
|
||||
data.topicData.breadcrumbs = crumbs.concat(breadcrumbs);
|
||||
next(null, data.topicData);
|
||||
});
|
||||
},
|
||||
function (topicData, next) {
|
||||
|
||||
Reference in New Issue
Block a user