From 1e53ae4fb22717841446186ef1d8fe209b64f07f Mon Sep 17 00:00:00 2001 From: Will Martin Date: Fri, 16 Dec 2022 08:47:34 -0500 Subject: [PATCH] [SM-387] fix org-switcher sorting (#4236) --- .../src/app/secrets-manager/layout/org-switcher.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.ts index 87a392901c..0da0ac81c7 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/layout/org-switcher.component.ts @@ -10,7 +10,10 @@ import type { Organization } from "@bitwarden/common/models/domain/organization" templateUrl: "org-switcher.component.html", }) export class OrgSwitcherComponent { - protected organizations$: Observable = this.organizationService.organizations$; + protected organizations$: Observable = + this.organizationService.organizations$.pipe( + map((orgs) => orgs.sort((a, b) => a.name.localeCompare(b.name))) + ); protected activeOrganization$: Observable = combineLatest([ this.route.paramMap, this.organizationService.organizations$,