fix: don't try to sort tasks when none were returned

This commit is contained in:
kolaente 2022-02-26 12:30:56 +01:00
parent 42303e37df
commit 8cdcfaf071
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -201,6 +201,10 @@ export default {
} }
const tasks = await this.$store.dispatch('tasks/loadTasks', params) const tasks = await this.$store.dispatch('tasks/loadTasks', params)
if (!tasks) {
// When no tasks where returned, we won't be able to sort them.
return
}
// FIXME: sort tasks in computed // FIXME: sort tasks in computed
// Sort all tasks to put those with a due date before the ones without a due date, the // Sort all tasks to put those with a due date before the ones without a due date, the