Added null protection around RagfairInfo
on game start
This commit is contained in:
parent
83b4ecc176
commit
d4164d05c3
@ -152,6 +152,15 @@ export class GameController
|
||||
return;
|
||||
}
|
||||
|
||||
if (fullProfile.characters.pmc.RagfairInfo)
|
||||
{
|
||||
if (Number.isNaN(fullProfile.characters.pmc.RagfairInfo.rating))
|
||||
{
|
||||
this.logger.warning(`Profile: ${sessionID} ragfair rating was not a valid number, resetting to 0`);
|
||||
fullProfile.characters.pmc.RagfairInfo.rating = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const pmcProfile = fullProfile.characters.pmc;
|
||||
|
||||
this.logger.debug(`Started game with sessionId: ${sessionID} ${pmcProfile.Info?.Nickname}`);
|
||||
|
Loading…
Reference in New Issue
Block a user