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