From 75c82d010bb1071e1ef7a1f54dff2d44da0cdb53 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 26 Dec 2021 19:05:06 +0100 Subject: [PATCH] fix: don't try to load a task view with the id of the list --- src/views/tasks/TaskDetailView.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index 988b154aa..0697b8215 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -524,6 +524,13 @@ export default { }, computed: { taskId() { + // This ensures we're actually dealing with a task route and not trying to load a task with the id of + // its list. When closing the modal, this watcher gets triggered because the route param of the list + // route is also called "id". + if (!this.$route.name.startsWith('task')) { + return undefined + } + const {id} = this.$route.params return id === undefined ? id : Number(id) },