* client: fix sort helper

This commit is contained in:
Ildar Kamalov 2019-05-22 18:28:16 +03:00 committed by Simon Zolin
parent 22d3c38df2
commit 68a4cc597f
1 changed files with 3 additions and 4 deletions

View File

@ -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);