remove main post if page is greater than 1

this fixes pagination after the main post change
This commit is contained in:
barisusakli
2014-06-06 23:09:05 -04:00
parent 7610c11cd1
commit d32dfd98b7

View File

@@ -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);
});