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

Does Promise.from works correctly? #28

Closed
egorse opened this issue Feb 11, 2014 · 3 comments
Closed

Does Promise.from works correctly? #28

egorse opened this issue Feb 11, 2014 · 3 comments

Comments

@egorse
Copy link

egorse commented Feb 11, 2014

Promise.from(1).then(Promise.from(2)).then(Promise.from(3)).then(console.log); gives 1.

Is that by design?

I had impression it should resolve to last .then as 3.

@egorse
Copy link
Author

egorse commented Feb 11, 2014

.then accepts functions only. My bad 😪
Sadly it doesn't throw

@egorse egorse closed this as completed Feb 11, 2014
@ForbesLindesay
Copy link
Member

Unfortunately it's not allowed to throw as, according to the spec, that's valid behavior. It could log a warning though, and I'd be quite keen to have it do that (whenever the argument is "truthy")

@egorse
Copy link
Author

egorse commented Feb 11, 2014

Misread which 'value' meant in 2.2.7.3

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

2 participants