Skip to content

Commit

Permalink
ImagePost.processMultiplePostDataFromOneOwner now returns comment cou…
Browse files Browse the repository at this point in the history
…nt instead of comments
  • Loading branch information
Sebastian-Webster committed Oct 10, 2023
1 parent 5bda2b0 commit 0085f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/ImagePost.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0085f8e

Please sign in to comment.