From bbf6889ecc031f062ca244a389dd095dd923a866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 21 Sep 2020 22:24:38 -0400 Subject: [PATCH] fix: topic count on category page if filter is author --- src/categories/topics.js | 2 ++ 1 file changed, 2 insertions(+) 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; };