From aeea8f6e49413c3bb49e21fd81bfea25e4295626 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 19 Nov 2023 16:12:20 +0000 Subject: [PATCH] Guard against empty `RepeatableQuests` array in profile --- project/src/services/ProfileFixerService.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/project/src/services/ProfileFixerService.ts b/project/src/services/ProfileFixerService.ts index ad11a60a..4ee9ce58 100644 --- a/project/src/services/ProfileFixerService.ts +++ b/project/src/services/ProfileFixerService.ts @@ -563,6 +563,10 @@ export class ProfileFixerService this.logger.debug("Missing RepeatableQuests property added to profile"); } } + else + { + pmcProfile.RepeatableQuests = []; + } } /** @@ -925,7 +929,7 @@ export class ProfileFixerService } } - for (const repeatable of fullProfile.characters.pmc.RepeatableQuests) + for (const repeatable of fullProfile.characters.pmc.RepeatableQuests ?? []) { for (const activeQuest of repeatable.activeQuests ?? []) {