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

end() does not actually end the promise #16

Open
nicks opened this issue Aug 21, 2013 · 0 comments
Open

end() does not actually end the promise #16

nicks opened this issue Aug 21, 2013 · 0 comments

Comments

@nicks
Copy link
Contributor

nicks commented Aug 21, 2013

var q = require('kew')
q.resolve(true).end().then(function (x) { console.log("I'm still here") })

Logs "I'm still here"

Notice that end() does end all exceptions
q.reject(new Error()).end().then(function () {
console.log('never logged')
}).fail(function () {
console.log('never logged')
})

In contrast, Q's done() method returns nothing, so that the promise can't be chained at all. (And I think that's the right API)

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