0
0
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:
Chomp 2024-12-15 17:06:20 +00:00
parent ef14ad27e1
commit 42b3d7abc3

View File

@ -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;
}