1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

[AC-2351] Call filterCollections within the organizations$ subscription to avoid race condition (#8498)

This commit is contained in:
Shane Melton
2024-03-27 08:47:23 -07:00
committed by GitHub
parent 96d274b332
commit 3f6a567122

View File

@@ -62,6 +62,7 @@ export class ShareComponent implements OnInit, OnDestroy {
this.organizations$.pipe(takeUntil(this._destroy)).subscribe((orgs) => { this.organizations$.pipe(takeUntil(this._destroy)).subscribe((orgs) => {
if (this.organizationId == null && orgs.length > 0) { if (this.organizationId == null && orgs.length > 0) {
this.organizationId = orgs[0].id; this.organizationId = orgs[0].id;
this.filterCollections();
} }
}); });
@@ -69,8 +70,6 @@ export class ShareComponent implements OnInit, OnDestroy {
this.cipher = await cipherDomain.decrypt( this.cipher = await cipherDomain.decrypt(
await this.cipherService.getKeyForCipherKeyDecryption(cipherDomain), await this.cipherService.getKeyForCipherKeyDecryption(cipherDomain),
); );
this.filterCollections();
} }
filterCollections() { filterCollections() {