Skip to content

Commit

Permalink
исправляет ошибку со ссылками на фотографии
Browse files Browse the repository at this point in the history
  • Loading branch information
KateSolodchuk committed Oct 7, 2024
1 parent bb11080 commit 2c588df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const createComment = () => {
const comment = {};
const idAvatar = getRandomInteger(MIN_AVATAR, MAX_AVATAR);
comment.id = id++;
comment.avatar = 'img/avatar-{idAvatar()}.svg';
comment.avatar = `img/avatar-${idAvatar()}.svg`;
comment.message = MESSAGES[randomMessageIndex()];
comment.name = NAMES[randomNameIndex()];

Expand All @@ -96,7 +96,7 @@ const createPhoto = () => {
const randomDescriptionIndex = getRandomInteger(0, DESCRIPTIONS.length - 1);

photo.id = id;
photo.url = 'photos/{id}.jpg';
photo.url = `photos/${id}.jpg`;
photo.description = DESCRIPTIONS[randomDescriptionIndex()];
photo.likes = quantLikes();
photo.comments = Array.from({length: quantComments()}, createComment());
Expand Down

0 comments on commit 2c588df

Please sign in to comment.