fix(project): correctly load background when switching from or to a project view
Resolves https://community.vikunja.io/t/background-does-not-load/1437
This commit is contained in:
@ -539,6 +539,12 @@ const taskId = toRef(props, 'taskId')
|
||||
|
||||
const project = computed(() => projectStore.projects[task.value.projectId])
|
||||
watchEffect(() => {
|
||||
if (typeof project.value === 'undefined') {
|
||||
// assuming the task has not been loaded completely and thus the project id is 0.
|
||||
// This avoids flickering between a project background and none when opening the task detail view from
|
||||
// any the project views.
|
||||
return
|
||||
}
|
||||
baseStore.handleSetCurrentProject({
|
||||
project: project.value,
|
||||
})
|
||||
|
Reference in New Issue
Block a user