diff --git a/project/src/controllers/ProfileController.ts b/project/src/controllers/ProfileController.ts index fed218c2..cfa1007d 100644 --- a/project/src/controllers/ProfileController.ts +++ b/project/src/controllers/ProfileController.ts @@ -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; }