Skip to content

Commit

Permalink
fix infinite scroll error
Browse files Browse the repository at this point in the history
  • Loading branch information
robrotheram committed Dec 29, 2023
1 parent e981f07 commit e0c254d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions themes/eastnor/pages/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
};
const getPage = (index) => {
currentPage = index;
window.history.pushState(null, null, `/page/${index}`);
//window.history.pushState(null, null, `/page/${index}`);
loadingyContainer.style.display = 'flex';
fetch(`/page/${index}/index.html`).then(function (response) {
return response.text();
if(response.ok){
return response.text();
}
throw new Error(response.status + " Failed Fetch page ");
}).then(function (html) {
dom = parser.parseFromString(html, "text/html");
galleryContainer.append(dom.getElementsByClassName("galleryRow")[0]);
Expand Down

0 comments on commit e0c254d

Please sign in to comment.