compare now with null check

This commit is contained in:
Kasper Juul Hermansen 2021-11-22 17:31:34 +01:00
parent 8ce54d0766
commit 9e88b973fb
Signed by: kjuulh
GPG Key ID: DCD9397082D97069

View File

@ -20,7 +20,7 @@ export const TodoList = (props: {
return t.status == false; return t.status == false;
}) })
.sort((a, b) => a.created - b.created) .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]); }, [props.todos, props.hideDone]);
return ( return (