diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index 84fecfd1..18be2a7f 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -180,6 +180,8 @@ export class GameController this.databaseServer.getTables().bots.types.usec.firstName = [pmcProfile.Info.Nickname]; } } + + this.checkForAndRemoveUndefinedDialogs(fullProfile); } if (this.seasonalEventService.isAutomaticEventDetectionEnabled()) @@ -678,6 +680,19 @@ export class GameController } } + /** + * Check for a dialog with the key 'undefined', and remove it + * @param fullProfile Profile to check for dialog in + */ + protected checkForAndRemoveUndefinedDialogs(fullProfile: IAkiProfile): void + { + const undefinedDialog = fullProfile.dialogues["undefined"]; + if (undefinedDialog) + { + delete fullProfile.dialogues["undefined"]; + } + } + /** * Blank out the "test" mail message from prapor */