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

No argument passed to then function? #7

Closed
lxiaokun opened this issue Aug 2, 2016 · 1 comment
Closed

No argument passed to then function? #7

lxiaokun opened this issue Aug 2, 2016 · 1 comment

Comments

@lxiaokun
Copy link

lxiaokun commented Aug 2, 2016

pool.start().then(function(data) {
console.log(data); // data is undefined, which is inconsistent with Promise API
})

@timdp
Copy link
Owner

timdp commented Aug 2, 2016

I think it's perfectly valid to fulfil a promise with undefined. Otherwise, async noop () {} would be invalid too. Do you have a reference to the ECMAScript spec or another document that states that the result of a promise cannot be undefined?

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