mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
refactor: prolly dont need exists check
This commit is contained in:
@@ -281,8 +281,7 @@ module.exports = function (Topics) {
|
|||||||
Topics.getTopicField(tid, 'mainPid'),
|
Topics.getTopicField(tid, 'mainPid'),
|
||||||
db.getSortedSetRange(`tid:${tid}:posts`, 0, -1),
|
db.getSortedSetRange(`tid:${tid}:posts`, 0, -1),
|
||||||
]);
|
]);
|
||||||
const mainPidExists = await posts.exists(mainPid);
|
if (mainPid) {
|
||||||
if (mainPidExists) {
|
|
||||||
pids = [mainPid].concat(pids);
|
pids = [mainPid].concat(pids);
|
||||||
}
|
}
|
||||||
return pids;
|
return pids;
|
||||||
|
|||||||
Reference in New Issue
Block a user