1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

[AC-1423] Simply sort function

This commit is contained in:
Shane Melton
2023-06-21 16:51:47 -07:00
parent b9c2da1b35
commit b7d6243f58

View File

@@ -355,11 +355,14 @@ function sortSubscriptionItems(
) { ) {
if (a.bitwardenProduct == b.bitwardenProduct) { if (a.bitwardenProduct == b.bitwardenProduct) {
// sort addon items to the bottom // sort addon items to the bottom
return a.addonSubscriptionItem == b.addonSubscriptionItem if (a.addonSubscriptionItem == b.addonSubscriptionItem) {
? 0 return 0;
: a.addonSubscriptionItem }
? 1
: -1; if (a.addonSubscriptionItem) {
return 1;
}
return -1;
} }
return a.bitwardenProduct - b.bitwardenProduct; return a.bitwardenProduct - b.bitwardenProduct;
} }