mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
math.ceil pageCount
This commit is contained in:
@@ -70,7 +70,7 @@ notificationsController.get = function (req, res, next) {
|
|||||||
user.notifications.getAll(req.uid, selectedFilter.filter, _next);
|
user.notifications.getAll(req.uid, selectedFilter.filter, _next);
|
||||||
},
|
},
|
||||||
function (nids, next) {
|
function (nids, next) {
|
||||||
pageCount = nids.length / itemsPerPage;
|
pageCount = Math.max(1, Math.ceil(nids.length / itemsPerPage));
|
||||||
nids = nids.slice(start, stop + 1);
|
nids = nids.slice(start, stop + 1);
|
||||||
|
|
||||||
user.notifications.getNotifications(nids, req.uid, next);
|
user.notifications.getNotifications(nids, req.uid, next);
|
||||||
|
|||||||
Reference in New Issue
Block a user