diff --git a/src/index.js b/src/index.js index 22274c5..8db63c6 100755 --- a/src/index.js +++ b/src/index.js @@ -72,7 +72,7 @@ async function onSearch(evn) { currentPage += 1; const data = await getImages(searchQuery, currentPage); // console.log(data) - let totalPages = Math.ceil(data.totalHits / perPage); + const totalPages = Math.ceil(data.totalHits / perPage); gallery.insertAdjacentHTML('beforeend', createMarcup(data.hits)); if (totalPages === currentPage) { Notify.failure("We're sorry, but you've reached the end of search results.");