From 14c6104b655f87377b9f4f8252bf3cb13e78b0b1 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 4 Aug 2023 18:58:00 +0100 Subject: [PATCH] FIx dialogs not showing --- project/src/controllers/DialogueController.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project/src/controllers/DialogueController.ts b/project/src/controllers/DialogueController.ts index 3ad59657..b30dcd9d 100644 --- a/project/src/controllers/DialogueController.ts +++ b/project/src/controllers/DialogueController.ts @@ -72,7 +72,7 @@ export class DialogueController public generateDialogueList(sessionID: string): DialogueInfo[] { const data: DialogueInfo[] = []; - for (const dialogueId in this.dialogueHelper.getDialogsForProfile(sessionID).dialogues) + for (const dialogueId in this.dialogueHelper.getDialogsForProfile(sessionID)) { data.push(this.getDialogueInfo(dialogueId, sessionID)); } @@ -88,7 +88,8 @@ export class DialogueController */ public getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo { - const dialogue = this.dialogueHelper.getDialogsForProfile(sessionID).dialogues[dialogueID]; + const dialogs = this.dialogueHelper.getDialogsForProfile(sessionID); + const dialogue = dialogs[dialogueID]; const result: DialogueInfo = { _id: dialogueID,