null check collection ids filter

This commit is contained in:
Kyle Spearrin 2018-09-11 08:46:04 -04:00
parent d14a8bc301
commit 8c9705eec0
4 changed files with 4 additions and 4 deletions

2
jslib

@ -1 +1 @@
Subproject commit 4927d0d9077964ec1f047667ec3a2132af594527
Subproject commit d0ad8650605ec506704ed76f13f40fd4d33cffcd

View File

@ -152,7 +152,7 @@ export class VaultComponent implements OnInit, OnDestroy {
if (collectionId === 'unassigned') {
return c.collectionIds == null || c.collectionIds.length === 0;
} else {
return c.collectionIds.indexOf(collectionId) > -1;
return c.collectionIds != null && c.collectionIds.indexOf(collectionId) > -1;
}
};
if (load) {

View File

@ -47,7 +47,7 @@ export class CollectionsComponent implements OnInit, OnDestroy {
this.selectAll(false);
if (this.collectionIds != null) {
this.collections.forEach((c) => {
(c as any).checked = this.collectionIds.indexOf(c.id) > -1;
(c as any).checked = this.collectionIds != null && this.collectionIds.indexOf(c.id) > -1;
});
}
}

View File

@ -189,7 +189,7 @@ export class VaultComponent implements OnInit, OnDestroy {
async filterCollection(collectionId: string) {
this.ciphersComponent.showAddNew = false;
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchCollection');
await this.ciphersComponent.load((c) => c.collectionIds.indexOf(collectionId) > -1);
await this.ciphersComponent.load((c) => c.collectionIds != null && c.collectionIds.indexOf(collectionId) > -1);
this.clearFilters();
this.collectionId = collectionId;
this.go();