From a058b39aba7d2d2aaf6ca40536f90530e21a0b68 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 17 Jan 2023 22:51:30 +0100 Subject: [PATCH] fix: find project --- src/stores/tasks.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }