mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 23:52:58 +01:00
another crash fix
This commit is contained in:
@@ -43,8 +43,12 @@ module.exports = function(Topics) {
|
||||
|
||||
Topics.addPostData = function(postData, uid, callback) {
|
||||
var pids = postData.map(function(post) {
|
||||
return post.pid;
|
||||
});
|
||||
return post && post.pid;
|
||||
}).filter(Boolean);
|
||||
|
||||
if (!Array.isArray(pids) || !pids.length) {
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
async.parallel({
|
||||
favourites: function(next) {
|
||||
|
||||
Reference in New Issue
Block a user