From dff5d1c6cd1aa6185a06792248fec2c342aabe9e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 26 Mar 2024 13:09:47 -0400 Subject: [PATCH] fix: getSortedTopics; filter out topics in cid -1 unless explicitly asked for --- src/topics/sorted.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/topics/sorted.js b/src/topics/sorted.js index 92cc2f6ed6..77a31b3422 100644 --- a/src/topics/sorted.js +++ b/src/topics/sorted.js @@ -257,6 +257,7 @@ module.exports = function (Topics) { t && t.cid && !isCidIgnored[t.cid] && + (cids || parseInt(t.cid, 10) !== -1) && (!cids || cids.includes(String(t.cid))) && (!tags.length || tags.every(tag => t.tags.find(topicTag => topicTag.value === tag))) )).map(t => t.tid);