diff --git a/src/stores/tasks.ts b/src/stores/tasks.ts index 1f8594266..aebe1498e 100644 --- a/src/stores/tasks.ts +++ b/src/stores/tasks.ts @@ -342,9 +342,11 @@ export const useTaskStore = defineStore('task', () => { { project: string, projectId: IProject['id'] }) { let foundProjectId = null + console.log('find', {projectName, projectId}) + // Uses the following ways to get the project id of the new task: // 1. If specified in quick add magic, look in store if it exists and use it if it does - if (projectName !== null) { + if (typeof projectName !== 'undefined' && projectName !== null) { const project = projectStore.findProjectByExactname(projectName) foundProjectId = project === null ? null : project.id }