mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-01 13:41:07 +03:00
* client: fix sort helper
This commit is contained in:
parent
22d3c38df2
commit
68a4cc597f
1 changed files with 3 additions and 4 deletions
|
@ -213,15 +213,14 @@ export const sortClients = (clients) => {
|
|||
const compare = (a, b) => {
|
||||
const nameA = a.name.toUpperCase();
|
||||
const nameB = b.name.toUpperCase();
|
||||
let comparison = 0;
|
||||
|
||||
if (nameA > nameB) {
|
||||
comparison = 1;
|
||||
return 1;
|
||||
} else if (nameA < nameB) {
|
||||
comparison = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return comparison;
|
||||
return 0;
|
||||
};
|
||||
|
||||
return clients.sort(compare);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue