forked from vikunja/frontend
fix: don't try to load a task view with the id of the list
This commit is contained in:
parent
7e8e26679c
commit
75c82d010b
|
@ -524,6 +524,13 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
taskId() {
|
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
|
const {id} = this.$route.params
|
||||||
return id === undefined ? id : Number(id)
|
return id === undefined ? id : Number(id)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user