diff --git a/project/src/helpers/InRaidHelper.ts b/project/src/helpers/InRaidHelper.ts index 9f6e13d5..854ad570 100644 --- a/project/src/helpers/InRaidHelper.ts +++ b/project/src/helpers/InRaidHelper.ts @@ -176,11 +176,17 @@ export class InRaidHelper */ protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void { + if (!preRaidQuests) + { + // No quests to compare against, skip + return; + } + // Loop over all quests from post-raid profile for (const postRaidQuest of postRaidQuests) { // Find matching pre-raid quest - const preRaidQuest = preRaidQuests.find(x => x.qid === postRaidQuest.qid); + const preRaidQuest = preRaidQuests?.find(x => x.qid === postRaidQuest.qid); if (preRaidQuest) { // Post-raid quest is failed but wasn't pre-raid