From a515b0c3a4e39b047cd0d9c16dfdf1ba21031af8 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 31 Oct 2021 13:15:43 +0100 Subject: [PATCH] fix: don't try to check undefined relations --- src/components/tasks/partials/relatedTasks.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/tasks/partials/relatedTasks.vue b/src/components/tasks/partials/relatedTasks.vue index 269382f4..3badac6c 100644 --- a/src/components/tasks/partials/relatedTasks.vue +++ b/src/components/tasks/partials/relatedTasks.vue @@ -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