return on error

This commit is contained in:
Kyle Spearrin 2019-06-26 17:50:37 -04:00
parent 00f1aad65e
commit 75514d79a6
2 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,7 @@ export class CollectionsComponent implements OnInit {
if (!this.allowSelectNone && selectedCollectionIds.length === 0) {
this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'),
this.i18nService.t('selectOneCollection'));
return;
}
this.cipherDomain.collectionIds = selectedCollectionIds;
try {

View File

@ -70,6 +70,7 @@ export class ShareComponent implements OnInit {
if (selectedCollectionIds.length === 0) {
this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'),
this.i18nService.t('selectOneCollection'));
return;
}
const cipherDomain = await this.cipherService.get(this.cipherId);