-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path function to returns null on init #776
Comments
Thanks for reporting this issue. Can you provide a reduced test case? Try forking this demo which uses a path function: https://codepen.io/desandro/pen/ZxXNgR/ |
Ok, it seems that it only happens if the initial call to the path function is null: infinite-scroll.pkgd.js:851 Uncaught TypeError: Cannot read property 'match' of null I should probably check if there are additional pages before even initializing infinite scroll in this case. I was checking in the Path function. |
Thanks for that! I've added a fix that will go out in the next release. |
🎉 v3.0.4 has been released with this fix added. Please update! |
Hi, thanks for the fix. :)
|
for responseType: "text", i tried returning either nothing or null from path: option on end of data, but what i got was: infinite-scroll.pkgd.js:1265 GET http://127.0.0.1:8000/opus/null 404 (Not Found). function request( url, responseType, onLoad, onError, onLast ) {
var req = new XMLHttpRequest();
req.open( 'GET', url, true ); needs to check to see if url is undefined or empty string but it doesn't; it treats it like a regular value. This seems to be really unfabulous... |
When my path function returns null/false/undefined, it causes an error.
I have logic that at a certain point, the path function returns null, meaning no more pages.
How can I tell infinite scroll there are no more pages to load?
The text was updated successfully, but these errors were encountered: