fix: don't try to check undefined relations

This commit is contained in:
kolaente 2021-10-31 13:15:43 +01:00
parent 85e85aa2bb
commit a515b0c3a4
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -218,7 +218,8 @@ export default {
await this.taskRelationService.delete(rel)
Object.entries(this.relatedTasks).some(([relationKind, t]) => {
const found = this.relatedTasks[relationKind][t].id === this.relationToDelete.otherTaskId &&
const found = typeof this.relatedTasks[relationKind][t] !== 'undefined' &&
this.relatedTasks[relationKind][t].id === this.relationToDelete.otherTaskId &&
relationKind === this.relationToDelete.relationKind
if (!found) return false