mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-15 20:13:02 +01:00
refactor: check if tid is truthy
This commit is contained in:
@@ -94,6 +94,7 @@ privsTopics.filterTids = async function (privilege, tids, uid) {
|
||||
const canViewScheduled = _.zipObject(cids, results.view_scheduled);
|
||||
|
||||
tids = topicsData.filter(t => (
|
||||
t.tid &&
|
||||
cidsSet.has(t.cid) &&
|
||||
(results.isAdmin || privsTopics.canViewDeletedScheduled(t, {}, canViewDeleted[t.cid], canViewScheduled[t.cid]))
|
||||
)).map(t => t.tid);
|
||||
|
||||
Reference in New Issue
Block a user