Skip to content

Node.js based forum software built for the modern web

fix: topic count on category page if filter is author

Barış Soner Uşaklıbbf6889ecc03
diff --git a/src/categories/topics.js b/src/categories/topics.js
index 4034149a9b..5a39646c74 100644
--- a/src/categories/topics.js
+++ b/src/categories/topics.js
@@ -86,6 +86,8 @@ module.exports = function (Categories) {
const set = await Categories.buildTopicsSortedSet(data);
if (Array.isArray(set)) {
return await db.sortedSetIntersectCard(set);
+ } else if (data.targetUid && set) {
+ return await db.sortedSetCard(set);
}
return data.category.topic_count;
};