Commit c830ca31 authored by Tristan Cavelier's avatar Tristan Cavelier

replicatestorage sub storage management bug -> fixed

parent e2637115
......@@ -717,8 +717,9 @@
function firstResolved() { // *promises
var next = new Promise(), solver = next.defer(), count = arguments.length;
Array.prototype.forEach.call(arguments, function (item) {
Promise.when(item).done(solver.resolve).fail(function (error) {
Promise.when(item).always(function () {
count -= 1;
}).done(solver.resolve).fail(function (error) {
if (count === 0) {
solver.reject(error);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment