Fix error on death because extract is undefined
This commit is contained in:
parent
f5b3377d12
commit
0b50385b84
@ -198,7 +198,7 @@ export class MatchController
|
||||
this.handleCarExtract(extractName, pmcData, sessionId);
|
||||
}
|
||||
|
||||
if (this.extractWasViaCoop(extractName) && this.traderConfig.fence.coopExtractGift.sendGift)
|
||||
if (extractName && this.extractWasViaCoop(extractName) && this.traderConfig.fence.coopExtractGift.sendGift)
|
||||
{
|
||||
this.sendCoopTakenFenceMessage(sessionId);
|
||||
}
|
||||
@ -211,6 +211,12 @@ export class MatchController
|
||||
*/
|
||||
protected extractWasViaCoop(extractName: string): boolean
|
||||
{
|
||||
// No extract name, not a coop extract
|
||||
if (!extractName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (this.inraidConfig.coopExtracts.includes(extractName.trim()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user