Final touches to the facelift
This commit is contained in:
parent
379287af36
commit
a2fbf908aa
19 changed files with 194 additions and 87 deletions
|
|
@ -254,11 +254,11 @@ const { link, instance, user, postId } = Astro.props;
|
|||
if (comment.in_reply_to_id === post.postId || !(comment.in_reply_to_id in commentMap)) {
|
||||
commentMap[comment.id] = commentsList.length;
|
||||
commentsList.push(commentBox);
|
||||
} else {
|
||||
const commentsIndex = commentMap[comment.in_reply_to_id];
|
||||
} else if (commentMap[comment.in_reply_to_id]) {
|
||||
const commentsIndex = commentMap[comment.in_reply_to_id]!;
|
||||
commentMap[comment.id] = commentsIndex;
|
||||
const parentThreadDiv =
|
||||
commentsList[commentsIndex].querySelector<HTMLElementTagNameMap["div"]>("div[data-comment-thread]")!;
|
||||
commentsList[commentsIndex]!.querySelector<HTMLElementTagNameMap["div"]>("div[data-comment-thread]")!;
|
||||
parentThreadDiv.setAttribute("aria-hidden", "false");
|
||||
parentThreadDiv.appendChild(commentBox);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue