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) },