fix: don't emit a possible null task
This commit is contained in:
parent
3970d0fd31
commit
5f5ed410df
1 changed files with 8 additions and 4 deletions
|
@ -185,6 +185,10 @@ async function addTask() {
|
||||||
const taskRelationService = new TaskRelationService()
|
const taskRelationService = new TaskRelationService()
|
||||||
const relations = tasksToCreate.map(async t => {
|
const relations = tasksToCreate.map(async t => {
|
||||||
const createdTask = createdTasks.find(ct => ct.title === t.title)
|
const createdTask = createdTasks.find(ct => ct.title === t.title)
|
||||||
|
if (typeof createdTask === 'undefined') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (t.parent === null) {
|
if (t.parent === null) {
|
||||||
emit('taskAdded', createdTask)
|
emit('taskAdded', createdTask)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue