fixed pendingComment render

This commit is contained in:
plebbitor
2023-04-22 15:12:26 +02:00
parent ff3a311870
commit 6a403256d2
5 changed files with 63 additions and 61 deletions
+3 -2
View File
@@ -12,11 +12,12 @@ function renderThreadComments(comment, pendingComment = null) {
return [comment];
}).flat();
const sortedComments = renderedComments.sort((a, b) => a.timestamp - b.timestamp);
if (pendingComment?.parentCid === comment?.cid) {
renderedComments.push(pendingComment);
sortedComments.push(pendingComment);
}
const sortedComments = renderedComments.sort((a, b) => a.timestamp - b.timestamp);
return sortedComments;
}