Skip to content

Node.js based forum software built for the modern web

fix: crash

Barış Soner Uşaklıda64810a4a87
diff --git a/src/controllers/search.js b/src/controllers/search.js
index e3d9304dd7..906277f8ba 100644
--- a/src/controllers/search.js
+++ b/src/controllers/search.js
@@ -67,8 +67,8 @@ searchController.search = async function (req, res, next) {
const [searchData, categoriesData] = await Promise.all([
search.search(data),
- recordSearch(data),
buildCategories(req.uid, searchOnly),
+ recordSearch(data),
]);
searchData.pagination = pagination.create(page, searchData.pageCount, req.query);