Handle getting quest status when player profile lacks a Quests array

This commit is contained in:
Dev 2023-05-22 15:50:10 +01:00
parent 2f919c795c
commit 87c1c80a78

View File

@ -65,7 +65,7 @@ export class QuestHelper
*/
public getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus
{
const quest = pmcData.Quests.find(q => q.qid === questId);
const quest = pmcData.Quests?.find(q => q.qid === questId);
return quest
? quest.status