mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 23:52:58 +01:00
Merge pull request #2119 from Fusselwurm/patch-1
default for missing post_index parameter when topic pagination is used
This commit is contained in:
@@ -72,7 +72,7 @@ topicsController.get = function(req, res, next) {
|
||||
postIndex = Math.max((req.params.post_index || 1) - (settings.postsPerPage + 1), 0);
|
||||
}
|
||||
} else if (!req.query.page) {
|
||||
var index = Math.max(parseInt(req.params.post_index, 10), 0);
|
||||
var index = Math.max(parseInt(req.params.post_index, 10), 0) || 0;
|
||||
page = Math.ceil((index + 1) / settings.postsPerPage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user