mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 01:50:44 -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());
|
const allProfiles = Object.values(this.saveServer.getProfiles());
|
||||||
|
|
||||||
for (const profile of allProfiles) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user