Skip to content

Commit

Permalink
fix: topic count on category page if filter is author
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Sep 22, 2020
1 parent 9a7c3c6 commit bbf6889
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/categories/topics.js
Expand Up @@ -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;
};
Expand Down

0 comments on commit bbf6889

Please sign in to comment.