1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-08-25 23:03:07 +02:00

only use shareAttachmentWithServer for old attachments

This commit is contained in:
Kyle Spearrin 2018-11-15 08:55:29 -05:00
parent f514e2bb67
commit be080f4f17

View File

@ -467,7 +467,9 @@ export class CipherService implements CipherServiceAbstraction {
const attachmentPromises: Array<Promise<any>> = [];
if (cipher.attachments != null) {
cipher.attachments.forEach((attachment) => {
attachmentPromises.push(this.shareAttachmentWithServer(attachment, cipher.id, organizationId));
if (attachment.key == null) {
attachmentPromises.push(this.shareAttachmentWithServer(attachment, cipher.id, organizationId));
}
});
}
await Promise.all(attachmentPromises);