mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-23 00:40:23 +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]]'));
|
return next(new Error('[[error:no-topic]]'));
|
||||||
}
|
}
|
||||||
topicData.currentPage = page;
|
topicData.currentPage = page;
|
||||||
|
if(page > 1) {
|
||||||
|
topicData.posts.splice(0, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
next(err, topicData);
|
next(err, topicData);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user