Skip to content

Commit

Permalink
исправляет ошибки
Browse files Browse the repository at this point in the history
  • Loading branch information
KateSolodchuk committed Dec 17, 2024
1 parent c2bfc78 commit 9d58ba5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/render-comments.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const commentsList = document.querySelector('.social__comments');
const commentTemplate = commentsList.querySelector('.social__comment');
const commentCount = document.querySelector('.social__comment-count');
const commentsLoader = document.querySelector('.social__comment-loader');
const commentsLoader = document.querySelector('.comments-loader');

const VISIBLE_COMMENTS = 5;
let shownComments = 0;
Expand All @@ -26,11 +26,11 @@ const renderNextComments = () => {

commentsList.appendChild(commentsFragment);

commentCount.firstChild.textContent = `${renderedCommentsLength} из `;
commentCount.firstChild.textContent = `${renderedCommentsLength} `;
document.querySelector('.social__comment-total-count').textContent = comments.length;

if (renderedCommentsLength >= comments.length) {
commentsLoader.classList.add('.hidden');
commentsLoader.classList.add('hidden');
}

shownComments += VISIBLE_COMMENTS;
Expand Down

0 comments on commit 9d58ba5

Please sign in to comment.