From bcef32c5af71f6543d14c055f1167b8f9c5ea960 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Fri, 27 Jul 2018 13:38:37 -0400 Subject: [PATCH] closes #6645 --- src/topics/teaser.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/topics/teaser.js b/src/topics/teaser.js index 508bd51bc8..fddc32052d 100644 --- a/src/topics/teaser.js +++ b/src/topics/teaser.js @@ -57,7 +57,12 @@ module.exports = function (Topics) { function (next) { posts.getPostsFields(teaserPids, ['pid', 'uid', 'timestamp', 'tid', 'content'], next); }, - async.apply(user.blocks.filter, uid), + function (_postData, next) { + _postData = _postData.filter(function (post) { + return post && parseInt(post.pid, 10); + }) + user.blocks.filter(uid, _postData, next); + }, function (_postData, next) { postData = _postData; var uids = _.uniq(postData.map(function (post) {