1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-30 13:03:53 +01:00

catch error

This commit is contained in:
Kyle Spearrin 2018-07-27 22:08:31 -04:00
parent c8909beedd
commit 7c882ed40c

View File

@ -78,6 +78,7 @@ export class ShareComponent implements OnInit, OnDestroy {
} }
const checkedCollectionIds = this.collections.filter((c) => (c as any).checked).map((c) => c.id); const checkedCollectionIds = this.collections.filter((c) => (c as any).checked).map((c) => c.id);
try {
this.formPromise = Promise.all(attachmentPromises).then(async () => { this.formPromise = Promise.all(attachmentPromises).then(async () => {
await this.cipherService.shareWithServer(cipherView, this.organizationId, checkedCollectionIds); await this.cipherService.shareWithServer(cipherView, this.organizationId, checkedCollectionIds);
this.onSharedCipher.emit(); this.onSharedCipher.emit();
@ -85,6 +86,7 @@ export class ShareComponent implements OnInit, OnDestroy {
this.toasterService.popAsync('success', null, this.i18nService.t('sharedItem')); this.toasterService.popAsync('success', null, this.i18nService.t('sharedItem'));
}); });
await this.formPromise; await this.formPromise;
} catch { }
} }
check(c: CollectionView, select?: boolean) { check(c: CollectionView, select?: boolean) {