diff --git a/components/member-list.js b/components/member-list.js index 07ff67d..70847cf 100644 --- a/components/member-list.js +++ b/components/member-list.js @@ -101,7 +101,7 @@ function sortMembers(a, b) { return i - j; } - return nickA < nickB ? -1 : 1; + return nickA.localeCompare(nickB); } export default class MemberList extends Component { diff --git a/state.js b/state.js index 6c526cb..de52790 100644 --- a/state.js +++ b/state.js @@ -157,7 +157,7 @@ function compareBuffers(a, b) { return isServerBuffer(b) ? 1 : -1; } if (a.name != b.name) { - return a.name > b.name ? 1 : -1; + return a.name.localeCompare(b.name); } return 0; }