mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: replace parseInt that was excluding remote pids from calculation
Also fixes nodebb/nodebb-plugin-feed#13
This commit is contained in:
@@ -281,7 +281,8 @@ 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),
|
||||||
]);
|
]);
|
||||||
if (parseInt(mainPid, 10)) {
|
const mainPidExists = await posts.exists(mainPid);
|
||||||
|
if (mainPidExists) {
|
||||||
pids = [mainPid].concat(pids);
|
pids = [mainPid].concat(pids);
|
||||||
}
|
}
|
||||||
return pids;
|
return pids;
|
||||||
|
|||||||
Reference in New Issue
Block a user