* client: fix sort helper
This commit is contained in:
parent
22d3c38df2
commit
68a4cc597f
@ -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…
Reference in New Issue
Block a user