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.

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

m-e-l-u-h-a-n712e32805e3d
diff --git a/static/js/todo_widget.js b/static/js/todo_widget.js
index 5e60fd2fe66..a881d7947d9 100644
--- a/static/js/todo_widget.js
+++ b/static/js/todo_widget.js
@@ -5,6 +5,7 @@ import render_widgets_todo_widget_tasks from "../templates/widgets/todo_widget_t
import * as blueslip from "./blueslip";
import {$t} from "./i18n";
+import * as util from "./util";
export class TaskData {
task_map = new Map();
@@ -21,7 +22,7 @@ export class TaskData {
get_widget_data() {
const all_tasks = Array.from(this.task_map.values());
- all_tasks.sort((a, b) => a.task.localeCompare(b.task));
+ all_tasks.sort((a, b) => util.strcmp(a.task, b.task));
const pending_tasks = [];
const completed_tasks = [];