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:
parent
b9c2da1b35
commit
b7d6243f58
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user