mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
fix pageCount calculation
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user