fix(project): do not access find on current project views when none are provided

Resolves https://github.com/go-vikunja/vikunja/issues/2057
This commit is contained in:
kolaente 2026-01-07 18:06:53 +01:00
parent 49af08d3f6
commit 155e651eff
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ export const useBaseStore = defineStore('base', () => {
{project, forceUpdate = false, currentProjectViewId = undefined}: {project: IProject | null, forceUpdate?: boolean, currentProjectViewId?: IProjectView['id']},
) {
if (project === null || typeof project === 'undefined') {
setCurrentProject({})
setCurrentProject(null)
setBackground('')
setBlurHash('')
return

View File

@ -164,7 +164,7 @@ export const useKanbanStore = defineStore('kanban', () => {
if (bucketIndex === null) return
const currentTaskBucket = buckets.value[bucketIndex]
const currentView: IProjectView = baseStore.currentProject?.views.find(v => v.id === baseStore.currentProjectViewId)
const currentView: IProjectView | undefined = baseStore.currentProject?.views?.find(v => v.id === baseStore.currentProjectViewId)
if(typeof currentView === 'undefined') return
// If the task is done, make sure it is in the done bucket