From 8cdcfaf071544a17a9be9a0dcc11d51380873f40 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 26 Feb 2022 12:30:56 +0100 Subject: [PATCH] fix: don't try to sort tasks when none were returned --- src/views/tasks/ShowTasks.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/tasks/ShowTasks.vue b/src/views/tasks/ShowTasks.vue index 9b139984..7252f7a6 100644 --- a/src/views/tasks/ShowTasks.vue +++ b/src/views/tasks/ShowTasks.vue @@ -201,6 +201,10 @@ export default { } 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 // Sort all tasks to put those with a due date before the ones without a due date, the