Skip to content

Commit

Permalink
fix: if < 10 comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Sep 2, 2024
1 parent 70ad5f3 commit 2976c93
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,13 @@ export const comment = (() => {
}

response.data.is_admin = session.isAdmin();
const length = document.getElementById('comments').childNodes.length;
pagination.setResultData(length);

if (length == pagination.getPer()) {
document.getElementById('comments').lastElementChild.remove();
}

document.getElementById('comments').lastElementChild.remove();
document.getElementById('comments').innerHTML = card.renderContent(response.data) + document.getElementById('comments').innerHTML;
scroll();
}
Expand Down

0 comments on commit 2976c93

Please sign in to comment.