fix: find project

This commit is contained in:
kolaente 2023-01-17 22:51:30 +01:00
parent 25352e1b33
commit a058b39aba
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 1 deletions

View File

@ -342,9 +342,11 @@ export const useTaskStore = defineStore('task', () => {
{ project: string, projectId: IProject['id'] }) { { project: string, projectId: IProject['id'] }) {
let foundProjectId = null let foundProjectId = null
console.log('find', {projectName, projectId})
// Uses the following ways to get the project id of the new task: // 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 // 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) const project = projectStore.findProjectByExactname(projectName)
foundProjectId = project === null ? null : project.id foundProjectId = project === null ? null : project.id
} }