-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
load* functions can't use callbacks in preload() #949
Comments
I found the root cause of this bug. Almost done with a fix. |
awesome, thanks for looking into it! |
The problem was that the I added logic to the load functions to separate the success and failure callbacks from the decrementPreload function which will always be the last argment when in NOTE: for failure callbacks, I don't decrementPreload, because I think we want it to stick on the "loading..." if a load function fails in preload() because it won't satisfy the contract that it will be guaranteed to be loaded. |
@lmccart I added a bunch of new unit tests for I would have added more unit test but since all the other load functions use reqwest there is no way I know of to unit test them without having a dependancy on a running http server. Most of those are commented out because of this I think. The script I added to examples/ serve as a way to prove these work too. Seems to be working great! Let me know what you think! |
Pull request was merged so closing this. Thanks! |
I know only load functions should be in
preload()
, but are success callbacks blocked by design too?The text was updated successfully, but these errors were encountered: