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);