1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

filter out null emissions during decryption (#13374)

This commit is contained in:
Brandon Treston
2025-02-12 13:47:25 -05:00
committed by GitHub
parent 97e61c970c
commit 2b099cd8df

View File

@@ -5,6 +5,7 @@ import {
BehaviorSubject, BehaviorSubject,
combineLatest, combineLatest,
combineLatestWith, combineLatestWith,
filter,
firstValueFrom, firstValueFrom,
map, map,
Observable, Observable,
@@ -72,10 +73,12 @@ export class VaultFilterService implements VaultFilterServiceAbstraction {
this._organizationFilter, this._organizationFilter,
]), ]),
), ),
filter(([folders, ciphers, org]) => !!ciphers), // ciphers may be null, meaning decryption is in progress. Ignore this emission
switchMap(([folders, ciphers, org]) => { switchMap(([folders, ciphers, org]) => {
return this.filterFolders(folders, ciphers, org); return this.filterFolders(folders, ciphers, org);
}), }),
); );
folderTree$: Observable<TreeNode<FolderFilter>> = this.filteredFolders$.pipe( folderTree$: Observable<TreeNode<FolderFilter>> = this.filteredFolders$.pipe(
map((folders) => this.buildFolderTree(folders)), map((folders) => this.buildFolderTree(folders)),
); );