From 87636fc8873f4350f2fee0749add132bc837beee Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Thu, 30 Sep 2021 09:22:21 +0800 Subject: [PATCH] Commentron now includes `replies` for `ByID` request Wasn't aware of that, and that was causing 7146 ("show replies" visible when there are no replies). --- ui/redux/reducers/comments.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/redux/reducers/comments.js b/ui/redux/reducers/comments.js index 04c0bed8d..e967aa4ae 100644 --- a/ui/redux/reducers/comments.js +++ b/ui/redux/reducers/comments.js @@ -349,9 +349,7 @@ export default handleActions( const linkedCommentAncestors = Object.assign({}, state.linkedCommentAncestors); const updateStore = (comment, commentById, byId, repliesByParentId, topLevelCommentsById) => { - // 'comment.ByID' doesn't populate 'replies'. We should have at least 1 - // at the moment, and the correct value will populated by 'comment.List'. - commentById[comment.comment_id] = { ...comment, replies: 1 }; + commentById[comment.comment_id] = comment; byId[claimId] ? byId[claimId].unshift(comment.comment_id) : (byId[claimId] = [comment.comment_id]); const parentId = comment.parent_id;