diff --git a/client/src/helpers/helpers.js b/client/src/helpers/helpers.js index 773b54f9..031747f3 100644 --- a/client/src/helpers/helpers.js +++ b/client/src/helpers/helpers.js @@ -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);