From 155e651effbf8c8c6fb2428977577cac76cda8a8 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 7 Jan 2026 18:06:53 +0100 Subject: [PATCH] fix(project): do not access find on current project views when none are provided Resolves https://github.com/go-vikunja/vikunja/issues/2057 --- frontend/src/stores/base.ts | 2 +- frontend/src/stores/kanban.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/stores/base.ts b/frontend/src/stores/base.ts index 877c72e71..38510a7d7 100644 --- a/frontend/src/stores/base.ts +++ b/frontend/src/stores/base.ts @@ -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 diff --git a/frontend/src/stores/kanban.ts b/frontend/src/stores/kanban.ts index 168850769..d68ffbc62 100644 --- a/frontend/src/stores/kanban.ts +++ b/frontend/src/stores/kanban.ts @@ -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