mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fixed pendingComment render
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user