Skip to content
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

Wrong reasoning for why $q.when() required no extra work to adopt foreign promises #349

Open
prashantpalikhe opened this issue Jul 24, 2016 · 0 comments

Comments

@prashantpalikhe
Copy link

Notice that we didn’t really have to do anything to make the adoption of foreign Promises work. That’s because our then implementation already knows how to wrap a foreign Promise, and when merely wraps then.

then implementation is not aware of wrapping foreign promise, resolve is.

defer.resolve(value) knows if the value being passed is a thenable (foreing promise) and waits until the foregin promise is resolved before resolving itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant