From 9e88b973fb8f3686680db7cde87b07fe4b09a15f Mon Sep 17 00:00:00 2001 From: Kasper Juul Hermansen Date: Mon, 22 Nov 2021 17:31:34 +0100 Subject: [PATCH] compare now with null check --- src/client/src/components/todos/todoList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/components/todos/todoList.tsx b/src/client/src/components/todos/todoList.tsx index 2285fda..525ef9e 100644 --- a/src/client/src/components/todos/todoList.tsx +++ b/src/client/src/components/todos/todoList.tsx @@ -20,7 +20,7 @@ export const TodoList = (props: { return t.status == false; }) .sort((a, b) => a.created - b.created) - .sort((a, b) => b.priority.localeCompare(a.priority)); + .sort((a, b) => b.priority?.localeCompare(a.priority)); }, [props.todos, props.hideDone]); return (