1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

[PM-24261] Fix infinite loading on members tab (#15833)

Use combineLatest instead of withLatestFrom to ensure the observable
always emits whenever any value is updated
This commit is contained in:
Brandon Treston
2025-07-29 19:19:30 -04:00
committed by GitHub
parent f6e8df18c0
commit f079d79426

View File

@@ -13,7 +13,6 @@ import {
Observable, Observable,
shareReplay, shareReplay,
switchMap, switchMap,
withLatestFrom,
tap, tap,
} from "rxjs"; } from "rxjs";
@@ -310,10 +309,13 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
), ),
); );
const decryptedCollections$ = this.accountService.activeAccount$.pipe( const decryptedCollections$ = combineLatest([
this.accountService.activeAccount$.pipe(
getUserId, getUserId,
switchMap((userId) => this.keyService.orgKeys$(userId)), switchMap((userId) => this.keyService.orgKeys$(userId)),
withLatestFrom(response), ),
response,
]).pipe(
switchMap(([orgKeys, collections]) => switchMap(([orgKeys, collections]) =>
this.collectionService.decryptMany$(collections, orgKeys), this.collectionService.decryptMany$(collections, orgKeys),
), ),