Open evenfrost opened 4 years ago
Actually I've just checked the documentation and it says that the order should be preserved:
For resolved promises, the result array contains the resolved value at the same index as the promise. For rejected promises, the result array contains the return value of errFn at the same index as the promise.
So I assume this is a bug. I'm using v1.27.0
.
Hi,
Current behavior of
settleAll
function is that if some promise throws an error, it is removed from theresults
array and added toerrors
array. This way the order of promises is broken and additionally, it's hard to guess, from which promise the errors comes. E.g.To my mind, it would be much more intuitive if the order of resolved promises and errors preserved: