From b7d6243f580b7a54dc4c61e4898b1dd99dd29f96 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Wed, 21 Jun 2023 16:51:47 -0700 Subject: [PATCH] [AC-1423] Simply sort function --- .../organization-subscription-cloud.component.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts index 73782a5fc6..33ad230577 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts +++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.ts @@ -355,11 +355,14 @@ function sortSubscriptionItems( ) { if (a.bitwardenProduct == b.bitwardenProduct) { // sort addon items to the bottom - return a.addonSubscriptionItem == b.addonSubscriptionItem - ? 0 - : a.addonSubscriptionItem - ? 1 - : -1; + if (a.addonSubscriptionItem == b.addonSubscriptionItem) { + return 0; + } + + if (a.addonSubscriptionItem) { + return 1; + } + return -1; } return a.bitwardenProduct - b.bitwardenProduct; }