Fixed computed sorting to show closest due dates at the top of the list
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
David Morlitz 2022-01-04 10:55:58 -05:00
parent e451f6661e
commit 4b2a1764a3
2 changed files with 3 additions and 3 deletions

View File

@ -366,4 +366,4 @@ export default {
.list-view .task-add {
padding: 1rem 1rem 0;
}
</style>
</style>

View File

@ -207,7 +207,7 @@ export default {
// soonest before the later ones.
// We can't use the api sorting here because that sorts tasks with a due date after
// ones without a due date.
this.tasks = tasks.sort((a, b) => {
this.tasks = tasks.sort((b, a) => {
const sortByDueDate = b.dueDate - a.dueDate
return sortByDueDate === 0
? b.id - a.id
@ -278,4 +278,4 @@ h3 {
.llama-cool {
margin-top: 2rem;
}
</style>
</style>