WIP: fix: don't try to load a task view with the id of the list #1252
|
@ -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)
|
||||
},
|
||||
|
|
Reference in New Issue
Maybe a better fix would be to rename the param in the router config to something like
taskId
?Yes that makes sense. I do actually already the opposite in the modal branch:
I renamed the list id param in
listId
. E.g.43c935ca41/src/router/index.ts (L263)
So this PR will probably get obsolete once we merge the modal one?
I think so, yes
Okay, I'll set this to wip until the other one is merged so we don't accedentially merge this.