1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

[SM-387] fix org-switcher sorting (#4236)

This commit is contained in:
Will Martin
2022-12-16 08:47:34 -05:00
committed by GitHub
parent 94b1a7743d
commit 1e53ae4fb2

View File

@@ -10,7 +10,10 @@ import type { Organization } from "@bitwarden/common/models/domain/organization"
templateUrl: "org-switcher.component.html",
})
export class OrgSwitcherComponent {
protected organizations$: Observable<Organization[]> = this.organizationService.organizations$;
protected organizations$: Observable<Organization[]> =
this.organizationService.organizations$.pipe(
map((orgs) => orgs.sort((a, b) => a.name.localeCompare(b.name)))
);
protected activeOrganization$: Observable<Organization> = combineLatest([
this.route.paramMap,
this.organizationService.organizations$,