From 0085f8e6593eed4e9ed8d9896f9d6694c17d2801 Mon Sep 17 00:00:00 2001 From: Sebastian Webster Date: Wed, 11 Oct 2023 01:04:10 +1300 Subject: [PATCH] ImagePost.processMultiplePostDataFromOneOwner now returns comment count instead of comments --- libraries/ImagePost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ImagePost.js b/libraries/ImagePost.js index 3738fbf9..cca20695 100644 --- a/libraries/ImagePost.js +++ b/libraries/ImagePost.js @@ -29,7 +29,7 @@ class ImagePostClass { isOwner: postOwner._id.toString() === userRequesting._id.toString(), interacted: !!isUpvoted || !!isDownvoted, _id: post._id.toString(), - comments: post.comments ? post.comments.map(comment => ({...comment, commentId: String(comment.commentId)})) : [] + comments: post.comments ? post.comments.length : 0 } if (isUpvoted) {