-
Notifications
You must be signed in to change notification settings - Fork 9
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
Error in optimization code when there is a single promise not in the 0th index in the list of fields to be resolved. #4
Comments
The fix at #5 handled this for me. Traceback
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a bug on this line. I believe it should be
return completed_results[index].then(on_one_resolved)
instead ofreturn completed_results[0].then(on_one_resolved)
It looks like that code is optimizing for when there is only a single Promise being returned and tries to execute the 0th index of "awaitable_promise"s. However it is possible the awaitable index may not be the 0ths index, it could be the 1st.
Here is some sample code that reproduces the issue.
Before:
After:
The text was updated successfully, but these errors were encountered: