From 74dd02e280a9dcbb0f603733bca13a6dd790dd09 Mon Sep 17 00:00:00 2001 From: Adam Kariv Date: Tue, 12 Dec 2023 18:18:15 +0200 Subject: [PATCH] fixes kolzchut/srm#707 --- projects/srm/src/app/result-card/result-card.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/srm/src/app/result-card/result-card.component.ts b/projects/srm/src/app/result-card/result-card.component.ts index 32a5350b..38053fcd 100644 --- a/projects/srm/src/app/result-card/result-card.component.ts +++ b/projects/srm/src/app/result-card/result-card.component.ts @@ -91,7 +91,7 @@ export class ResultCardComponent implements OnChanges { const highlighted = this.card._highlights['situations.name.hebrew']; if (highlighted.length === this.card?.situations?.length) { this.card.situations.forEach((s, i) => { - if (!s.__selected && highlighted[i].indexOf('') >= 0) { + if (!s.__selected && highlighted[i]?.indexOf('') >= 0) { s.name = highlighted[i]; s.__selected = true; this.selectedSituations.push(s); @@ -103,7 +103,7 @@ export class ResultCardComponent implements OnChanges { const highlighted = this.card._highlights['responses.name.hebrew']; if (highlighted.length === this.card?.responses?.length) { this.card.responses.forEach((r, i) => { - if (!r.__selected && highlighted[i].indexOf('') >= 0) { + if (!r.__selected && highlighted[i]?.indexOf('') >= 0) { r.name = highlighted[i]; r.__selected = true; this.selectedResponses.push(r);