1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-02 13:23:29 +01: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
No known key found for this signature in database

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;
} }