Infinite scroll pages breaks

Hello,

I have some custom code that automatically loads the next page at the bottom of each page.

However, this seems to break on two pages.

The bottom of these two pages do not load the next.

https://preview.webflow.com/preview/portfolio-b4b390?utm_medium=preview_link&utm_source=designer&utm_content=portfolio-b4b390&preview=e39797e907a93669b20b3a09a1f1c235&pageId=65db2cb3911ea549f2936c88&workflow=preview

https://preview.webflow.com/preview/portfolio-b4b390?utm_medium=preview_link&utm_source=designer&utm_content=portfolio-b4b390&preview=e39797e907a93669b20b3a09a1f1c235&pageId=65db317ebffdd2638a153920&workflow=preview

Any help would be very helpful!

Thanks