From 712e32805e3db6cffafd96ea36c9c986a018e00f Mon Sep 17 00:00:00 2001 From: m-e-l-u-h-a-n Date: Sat, 12 Jun 2021 15:25:42 +0530 Subject: [PATCH] todo_widget: Use util.strcmp instead of localeCompare for sorting. --- static/js/todo_widget.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/todo_widget.js b/static/js/todo_widget.js index 5e60fd2fe6..a881d7947d 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 = [];