Skip to content

Commit 90dbc82

Browse files
author
Saurabh Kumar Bajpai
committed
fix: additional real bug fixes
1 parent 70d4b52 commit 90dbc82

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎frontend/js/chat.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ Tell me: what is stirring in you today?`,
908908
}
909909

910910
exportChat() {
911-
const chatText = this.conversationHistory.map(message => {
911+
const chatText = this.(conversationHistory ?? []).map(message => {
912912
const sender = message.type === 'user' ? 'You' : 'Bookseller';
913913
const time = this.formatTime(message.timestamp);
914914
return `[${time}] ${sender}: ${message.content}`;

‎frontend/js/community-stories.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ document.addEventListener('DOMContentLoaded', () => {
4949
}
5050
];
5151

52-
let stories = (() => { try { return JSON.parse(localStorage.getItem('bibliodrift_community_stories')) } catch { return null } })() || defaultStories;
52+
let stories = (() => { try { return (JSON.parse(localStorage.getItem('bibliodrift_community_stories') ?? "null") ?? null) } catch { return null } })() || defaultStories;
5353

5454
// Save to local storage
5555
const saveStories = () => {

0 commit comments

Comments
 (0)