mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
null check collection ids filter
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 4927d0d907...d0ad865060
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user