remove more parseints

This commit is contained in:
Barış Soner Uşaklı
2018-10-23 22:28:37 -04:00
parent 728e7bdae9
commit 44a957faca
3 changed files with 11 additions and 21 deletions

View File

@@ -66,7 +66,7 @@ categoryController.get = function (req, res, callback) {
settings = results.userSettings;
var topicCount = parseInt(results.categoryData.topic_count, 10);
var topicCount = results.categoryData.topic_count;
pageCount = Math.max(1, Math.ceil(topicCount / settings.topicsPerPage));
if (topicIndex < 0 || topicIndex > Math.max(topicCount - 1, 0)) {