mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
[AC-1423] Simply sort function
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user