From 0b75d5d6fe9c166543c0438e49c4aa2ec48b38f2 Mon Sep 17 00:00:00 2001 From: Daniel Avila Date: Mon, 20 Mar 2023 02:30:08 -0400 Subject: [PATCH] chore: another hotfix patch on getConvoTitle --- api/models/Conversation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/models/Conversation.js b/api/models/Conversation.js index f4385f5c72..bc25b3f57d 100644 --- a/api/models/Conversation.js +++ b/api/models/Conversation.js @@ -198,7 +198,8 @@ module.exports = { if (convo && !convo.title) { return null; } else { - return convo.title; + // TypeError: Cannot read properties of null (reading 'title') + return convo?.title || 'New Chat'; } } catch (error) { console.log(error);