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:
parent
49af08d3f6
commit
155e651eff
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue