parent
4e2723a751
commit
2b9d039837
2 changed files with 14 additions and 8 deletions
|
@ -39757,11 +39757,14 @@ OutgoingMessage.prototype = {
|
||||||
if (updateDevices === undefined) {
|
if (updateDevices === undefined) {
|
||||||
return this.server.getKeysForNumber(number).then(handleResult);
|
return this.server.getKeysForNumber(number).then(handleResult);
|
||||||
} else {
|
} else {
|
||||||
var promises = updateDevices.map(function(device) {
|
var promise = Promise.resolve();
|
||||||
return this.server.getKeysForNumber(number, device).then(handleResult);
|
for (var i in updateDevices) {
|
||||||
|
promise = promise.then(function() {
|
||||||
|
return this.server.getKeysForNumber(number, updateDevices[i]).then(handleResult);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
return Promise.all(promises);
|
return promise;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,14 @@ OutgoingMessage.prototype = {
|
||||||
if (updateDevices === undefined) {
|
if (updateDevices === undefined) {
|
||||||
return this.server.getKeysForNumber(number).then(handleResult);
|
return this.server.getKeysForNumber(number).then(handleResult);
|
||||||
} else {
|
} else {
|
||||||
var promises = updateDevices.map(function(device) {
|
var promise = Promise.resolve();
|
||||||
return this.server.getKeysForNumber(number, device).then(handleResult);
|
for (var i in updateDevices) {
|
||||||
|
promise = promise.then(function() {
|
||||||
|
return this.server.getKeysForNumber(number, updateDevices[i]).then(handleResult);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
return Promise.all(promises);
|
return promise;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue