From 47af3eb7e54c843a418bb4f909e04cb400313f2c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 8 Mar 2017 19:49:27 +0300 Subject: [PATCH] use the real count --- src/controllers/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/search.js b/src/controllers/search.js index be98589c54..4ca7937687 100644 --- a/src/controllers/search.js +++ b/src/controllers/search.js @@ -60,7 +60,7 @@ searchController.search = function (req, res, next) { var searchData = results.search; searchData.categories = categoriesData; - searchData.categoriesCount = results.categories.length; + searchData.categoriesCount = categoriesData.length; searchData.pagination = pagination.create(page, searchData.pageCount, req.query); searchData.showAsPosts = !req.query.showAs || req.query.showAs === 'posts'; searchData.showAsTopics = req.query.showAs === 'topics';