From caf30b5580394f13f34717005d27d973f28b65fd Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 12 Oct 2016 22:22:15 +0300 Subject: [PATCH] use post --- src/posts/summary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posts/summary.js b/src/posts/summary.js index 31c398a321..b40eeb1b40 100644 --- a/src/posts/summary.js +++ b/src/posts/summary.js @@ -64,7 +64,7 @@ module.exports = function(Posts) { posts.forEach(function(post, i) { post.index = utils.isNumber(results.indices[i]) ? parseInt(results.indices[i], 10) + 1 : 1; post.isMainPost = post.index - 1 === 0; - post.deleted = parseInt(posts[i].deleted, 10) === 1; + post.deleted = parseInt(post.deleted, 10) === 1; post.upvotes = parseInt(post.upvotes, 10) || 0; post.downvotes = parseInt(post.downvotes, 10) || 0; post.votes = post.upvotes - post.downvotes;