mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
capture attachment in closure
This commit is contained in:
parent
47cb20f01e
commit
51e30b2f7a
@ -116,7 +116,7 @@
|
||||
var attachmentSharePromises = [];
|
||||
if ($scope.login.attachments) {
|
||||
for (var i = 0; i < $scope.login.attachments.length; i++) {
|
||||
var attachment = $scope.login.attachments[i];
|
||||
(function (attachment) {
|
||||
var promise = cipherService.downloadAndDecryptAttachment(null, attachment, false)
|
||||
.then(function (decData) {
|
||||
return cryptoService.encryptToBytes(decData.buffer, orgKey);
|
||||
@ -133,6 +133,7 @@
|
||||
}, fd).$promise;
|
||||
});
|
||||
attachmentSharePromises.push(promise);
|
||||
})($scope.login.attachments[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user