Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

popovers: Use util.strcmp instead of localeCompare for sorting.

m-e-l-u-h-a-nf1d7971a7f8f
diff --git a/static/js/popovers.js b/static/js/popovers.js
index 2c28a5d08cb..4faffb1b2fe 100644
--- a/static/js/popovers.js
+++ b/static/js/popovers.js
@@ -378,7 +378,7 @@ export function hide_user_profile() {
}
function compare_by_name(a, b) {
- return a.name.localeCompare(b.name);
+ return util.strcmp(a.name, b.name);
}
function format_user_stream_list_item(stream) {
@@ -560,7 +560,7 @@ function fetch_group_members(member_ids) {
}
function sort_group_members(members) {
- return members.sort((a, b) => a.full_name.localeCompare(b.full_name));
+ return members.sort((a, b) => util.strcmp(a.full_name, b.fullname));
}
// exporting these functions for testing purposes