mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
check mainPid
This commit is contained in:
@@ -262,7 +262,10 @@ var async = require('async'),
|
||||
return next(err);
|
||||
}
|
||||
|
||||
pids = [topicData.mainPid].concat(pids);
|
||||
pids = topicData.mainPid ? [topicData.mainPid].concat(pids) : pids;
|
||||
if (!pids.length) {
|
||||
return next(null, []);
|
||||
}
|
||||
posts.getPostsByPids(pids, tid, function(err, posts) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
|
||||
Reference in New Issue
Block a user