You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Promise.all(iterable) doesn't work with Sets / Iterables #1348
As per the docs, Promise.all(iterable) should work with all kinds of Iterables and not only Arrays. This simple test shows the problem.
varutil=require("util")functioninspect(){console.log(util.inspect(arguments));}console.log("With a Set: (fails)")varset=newSet([true,true]);Promise.all(set).then(inspect,inspect);console.log("With an Array: (works)")vararr=[true,true];Promise.all(arr).then(inspect,inspect);
To make Promise.all(iterable) work with a Set, the Set would firstly need to be converted into a regular Array.
changed the title [-]Promise.all(iterable) doesn't work with Sets / Iteratables[/-][+]Promise.all(iterable) doesn't work with Sets / Iterables[/+]on Apr 5, 2015
Activity
[-]Promise.all(iterable) doesn't work with Sets / Iteratables[/-][+]Promise.all(iterable) doesn't work with Sets / Iterables[/+]zloirock commentedon Apr 5, 2015
V8 not support it yet, in Chrome too. I fixed v8
Promise.allandPromise.racein core-js.petkaantonov commentedon Apr 5, 2015
The issue is fixed in dev V8/chrome canary. Io.js uses stable V8 releases (4.1.x), so when Chrome 43 becomes stable it will work in io.js too.
Closing because this is not a io.js bug