mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
catch error
This commit is contained in:
parent
c8909beedd
commit
7c882ed40c
@ -78,13 +78,15 @@ export class ShareComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
const checkedCollectionIds = this.collections.filter((c) => (c as any).checked).map((c) => c.id);
|
||||
this.formPromise = Promise.all(attachmentPromises).then(async () => {
|
||||
await this.cipherService.shareWithServer(cipherView, this.organizationId, checkedCollectionIds);
|
||||
this.onSharedCipher.emit();
|
||||
this.analytics.eventTrack.next({ action: 'Shared Cipher' });
|
||||
this.toasterService.popAsync('success', null, this.i18nService.t('sharedItem'));
|
||||
});
|
||||
await this.formPromise;
|
||||
try {
|
||||
this.formPromise = Promise.all(attachmentPromises).then(async () => {
|
||||
await this.cipherService.shareWithServer(cipherView, this.organizationId, checkedCollectionIds);
|
||||
this.onSharedCipher.emit();
|
||||
this.analytics.eventTrack.next({ action: 'Shared Cipher' });
|
||||
this.toasterService.popAsync('success', null, this.i18nService.t('sharedItem'));
|
||||
});
|
||||
await this.formPromise;
|
||||
} catch { }
|
||||
}
|
||||
|
||||
check(c: CollectionView, select?: boolean) {
|
||||
|
Loading…
Reference in New Issue
Block a user