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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user