From ca8fb41fab0591e5796a82a142fd218c30e35156 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 22 Oct 2024 18:55:47 +0100 Subject: [PATCH] fix error --- projects/backend/src/service/score.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/backend/src/service/score.service.ts b/projects/backend/src/service/score.service.ts index 79fb523..7b258c8 100644 --- a/projects/backend/src/service/score.service.ts +++ b/projects/backend/src/service/score.service.ts @@ -212,7 +212,7 @@ export class ScoreService { right: score.accRight, }, } as AdditionalScoreData; - if (rawScoreImprovement.score > 0) { + if (rawScoreImprovement && rawScoreImprovement.score > 0) { data.scoreImprovement = { score: rawScoreImprovement.score, misses: {