-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing nested waits & cannot resolve > once
This commit updates promises so that they can only be resolved or rejected once, and instead of ignoring subsequent attempts, throws an exception. This is to make it easier to spot bugs related to promise resolution. This commit updates the wait function to wait on a result until a value is returned, including waiting on any promises (i.e., if you're waiting on a then promise that returns a promise, then the wait function will also wait on the forwarded promise).
- Loading branch information
Showing
2 changed files
with
61 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ah ha, that's where we wanted the loop.