fix pageCount calculation

This commit is contained in:
Barış Soner Uşaklı
2018-01-23 15:52:54 -05:00
parent d70cdf1e28
commit 813fdaf6f6
3 changed files with 3 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ Topics.getPageCount = function (tid, uid, callback) {
user.getSettings(uid, next);
},
function (settings, next) {
next(null, Math.ceil((parseInt(postCount, 10) - 1) / settings.postsPerPage));
next(null, Math.ceil(parseInt(postCount, 10) / settings.postsPerPage));
},
], callback);
};