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