Fix attachment not being added if the task was not a kanban task

This commit is contained in:
kolaente 2021-01-28 21:24:22 +01:00
parent 23552b2b1b
commit 4df33d1152
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
2 changed files with 1 additions and 1 deletions

View file

@ -41,6 +41,7 @@ export default {
addTaskAttachment(ctx, {taskId, attachment}) {
const t = ctx.rootGetters['kanban/getTaskById'](taskId)
if (t.task === null) {
ctx.commit('attachments/add', attachment, {root: true})
return
}
t.task.attachments.push(attachment)