Fix strange loop in sendMessageProto
Don't declare a new `var i` within the scope of an existing `var i`. Fixes #63
This commit is contained in:
parent
e8399f98df
commit
ac5c359053
1 changed files with 3 additions and 3 deletions
|
@ -175,9 +175,9 @@ window.textsecure.messaging = function() {
|
|||
var devicesForNumber = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
||||
|
||||
var promises = [];
|
||||
for (var i in devicesForNumber)
|
||||
if (devicesForNumber[i].registrationId === undefined)
|
||||
promises[promises.length] = getKeysForNumber(number, [parseInt(textsecure.utils.unencodeNumber(devicesForNumber[i].encodedNumber)[1])]);
|
||||
for (var j in devicesForNumber)
|
||||
if (devicesForNumber[j].registrationId === undefined)
|
||||
promises[promises.length] = getKeysForNumber(number, [parseInt(textsecure.utils.unencodeNumber(devicesForNumber[j].encodedNumber)[1])]);
|
||||
|
||||
Promise.all(promises).then(function() {
|
||||
devicesForNumber = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
||||
|
|
Loading…
Reference in a new issue