fix: topic count not showing up on category page

This commit is contained in:
Barış Soner Uşaklı
2024-10-30 11:56:36 -04:00
parent 93844321f4
commit dd3634462f

View File

@@ -118,9 +118,9 @@ module.exports = function (Categories) {
if (parseInt(cid, 10) === -1 && uid > 0) { if (parseInt(cid, 10) === -1 && uid > 0) {
set.add(`uid:${uid}:inbox`); set.add(`uid:${uid}:inbox`);
} }
const setValue = Array.from(set);
const result = await plugins.hooks.fire('filter:categories.buildTopicsSortedSet', { const result = await plugins.hooks.fire('filter:categories.buildTopicsSortedSet', {
set: Array.from(set), set: set.size > 1 ? setValue : setValue[0],
data: data, data: data,
}); });
return result && result.set; return result && result.set;