mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-12 15:50:42 -05:00
Added nullguard protection to getFriends()
This commit is contained in:
parent
ef14ad27e1
commit
42b3d7abc3
@ -368,9 +368,9 @@ export class ProfileController {
|
||||
const allProfiles = Object.values(this.saveServer.getProfiles());
|
||||
|
||||
for (const profile of allProfiles) {
|
||||
const pmcProfile = profile.characters.pmc;
|
||||
const pmcProfile = profile?.characters?.pmc;
|
||||
|
||||
if (!pmcProfile.Info.LowerNickname.includes(info.nickname.toLocaleLowerCase())) {
|
||||
if (!pmcProfile?.Info?.LowerNickname?.includes(info.nickname.toLocaleLowerCase())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user