Nullguard removeQuestFromScavProfile()
accessing a null scav quest array
This commit is contained in:
parent
7849a730f2
commit
37029791da
@ -498,10 +498,10 @@ export class QuestController
|
||||
protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void
|
||||
{
|
||||
const fullProfile = this.profileHelper.getFullProfile(sessionId);
|
||||
const repeatableInScavProfile = fullProfile.characters.scav.Quests.find(x => x.qid === questIdToRemove);
|
||||
const repeatableInScavProfile = fullProfile.characters.scav.Quests?.find(x => x.qid === questIdToRemove);
|
||||
if (!repeatableInScavProfile)
|
||||
{
|
||||
this.logger.warning(`Unable to remove quest: ${questIdToRemove} from profile as scav profile cannot be found`);
|
||||
this.logger.warning(`Unable to remove quest: ${questIdToRemove} from profile as scav quest cannot be found`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user