null check collection ids filter
This commit is contained in:
parent
d14a8bc301
commit
8c9705eec0
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 4927d0d9077964ec1f047667ec3a2132af594527
|
Subproject commit d0ad8650605ec506704ed76f13f40fd4d33cffcd
|
|
@ -152,7 +152,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
if (collectionId === 'unassigned') {
|
if (collectionId === 'unassigned') {
|
||||||
return c.collectionIds == null || c.collectionIds.length === 0;
|
return c.collectionIds == null || c.collectionIds.length === 0;
|
||||||
} else {
|
} else {
|
||||||
return c.collectionIds.indexOf(collectionId) > -1;
|
return c.collectionIds != null && c.collectionIds.indexOf(collectionId) > -1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (load) {
|
if (load) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ export class CollectionsComponent implements OnInit, OnDestroy {
|
||||||
this.selectAll(false);
|
this.selectAll(false);
|
||||||
if (this.collectionIds != null) {
|
if (this.collectionIds != null) {
|
||||||
this.collections.forEach((c) => {
|
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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
async filterCollection(collectionId: string) {
|
async filterCollection(collectionId: string) {
|
||||||
this.ciphersComponent.showAddNew = false;
|
this.ciphersComponent.showAddNew = false;
|
||||||
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchCollection');
|
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.clearFilters();
|
||||||
this.collectionId = collectionId;
|
this.collectionId = collectionId;
|
||||||
this.go();
|
this.go();
|
||||||
|
|
Loading…
Reference in New Issue