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

Implicit Promise.all() resolves promise too eagerly. #235

AlexMax opened this Issue Jun 18, 2014 · 0 comments


None yet
1 participant

AlexMax commented Jun 18, 2014

Thanks to spion from Node.js IRC for helping me pinpoint a test case:

P.resolve(1).then(function(x) {
  return [x, P.resolve(2)]
}).spread(function(x, y) {
  return P.all([P.resolve(3), P.resolve(4)]);
}).then(function(a) {

// Expected: [3, 4]
// Actual: [1, 2]

Adding an explicit Promise.all() to the first return produces expected results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment