mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
remove main post if page is greater than 1
this fixes pagination after the main post change
This commit is contained in:
@@ -60,6 +60,9 @@ topicsController.get = function(req, res, next) {
|
||||
return next(new Error('[[error:no-topic]]'));
|
||||
}
|
||||
topicData.currentPage = page;
|
||||
if(page > 1) {
|
||||
topicData.posts.splice(0, 1);
|
||||
}
|
||||
}
|
||||
next(err, topicData);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user