feat: automatically create subtask relations based on indention #2443
|
@ -185,6 +185,10 @@ async function addTask() {
|
|||
const taskRelationService = new TaskRelationService()
|
||||
const relations = tasksToCreate.map(async t => {
|
||||
const createdTask = createdTasks.find(ct => ct.title === t.title)
|
||||
if (typeof createdTask === 'undefined') {
|
||||
konrad marked this conversation as resolved
Outdated
|
||||
return
|
||||
}
|
||||
|
||||
if (t.parent === null) {
|
||||
emit('taskAdded', createdTask)
|
||||
return
|
||||
|
|
Reference in New Issue
Block a user
In line 194 we return if
typeof createdTask === 'undefined'
.This implies that createdTask could be undefined here aswell. Is that intended?
mhh I didn't think this through. It should never be null.
I've adjusted this so that there's a check before emitting it.