forked from vikunja/frontend
fix: related task not removed from the list when deleting it
This commit is contained in:
parent
edc74fd598
commit
21ddd25714
|
@ -244,15 +244,19 @@ export default {
|
|||
try {
|
||||
await this.taskRelationService.delete(rel)
|
||||
|
||||
Object.entries(this.relatedTasks).some(([relationKind, t]) => {
|
||||
const found = typeof this.relatedTasks[relationKind][t] !== 'undefined' &&
|
||||
this.relatedTasks[relationKind][t].id === this.relationToDelete.otherTaskId &&
|
||||
relationKind === this.relationToDelete.relationKind
|
||||
if (!found) return false
|
||||
outer:
|
||||
for (const kind in this.relatedTasks) {
|
||||
for (const t in this.relatedTasks[kind]) {
|
||||
const found = typeof this.relatedTasks[kind][t] !== 'undefined' &&
|
||||
this.relatedTasks[kind][t].id === this.relationToDelete.otherTaskId &&
|
||||
kind === this.relationToDelete.relationKind
|
||||
if (!found) continue
|
||||
|
||||
this.relatedTasks[relationKind].splice(t, 1)
|
||||
return true
|
||||
})
|
||||
this.relatedTasks[kind].splice(t, 1)
|
||||
|
||||
break outer
|
||||
}
|
||||
}
|
||||
|
||||
this.saved = true
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user