mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
filter out null emissions during decryption (#13374)
This commit is contained in:
@@ -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)),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user