Node.js based forum software built for the modern web
fix: replace parseInt that was excluding remote pids from calculation
Julian Lam93bb73c17ea8
diff --git a/src/topics/posts.js b/src/topics/posts.jsindex 272b4d77ac..7a87b2cdc6 100644--- a/src/topics/posts.js+++ b/src/topics/posts.js@@ -281,7 +281,8 @@ module.exports = function (Topics) {Topics.getTopicField(tid, 'mainPid'),db.getSortedSetRange(`tid:${tid}:posts`, 0, -1),]);- if (parseInt(mainPid, 10)) {+ const mainPidExists = await posts.exists(mainPid);+ if (mainPidExists) {pids = [mainPid].concat(pids);}return pids;