Skip to content

Commit bbafbee

Browse files
committed
check-HW-lint
1 parent 957cef0 commit bbafbee

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

js/big-picture.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ const renderComments = (comments) => {
3333
commentsList.appendChild(fragment);
3434
};
3535

36-
// Функция для закрытия окна
37-
const closeBigPicture = () => {
38-
bigPicture.classList.add('hidden');
39-
document.body.classList.remove('modal-open');
40-
document.removeEventListener('keydown', onDocumentKeydown);
41-
};
42-
4336
// Обработчик нажатия клавиши Esc
4437
const onDocumentKeydown = (evt) => {
4538
if (isEscapeKey(evt)) {
@@ -48,6 +41,13 @@ const onDocumentKeydown = (evt) => {
4841
}
4942
};
5043

44+
// Функция для закрытия окна
45+
const closeBigPicture = () => {
46+
bigPicture.classList.add('hidden');
47+
document.body.classList.remove('modal-open');
48+
document.removeEventListener('keydown', onDocumentKeydown);
49+
};
50+
5151
// Функция для открытия окна и заполнения данными
5252
const openBigPicture = ({url, likes, comments, description}) => {
5353
bigPicture.classList.remove('hidden');

js/miniatures.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const renderMiniatures = (photos) => {
1313
img.dataset.id = id;
1414
picture.querySelector('.picture__likes').textContent = likes;
1515
picture.querySelector('.picture__comments').textContent = comments.length;
16-
listFragment.appendChild(pictureElement);
16+
listFragment.appendChild(picture);
1717
});
1818

1919
pictureList.appendChild(listFragment);

0 commit comments

Comments
 (0)