Skip to content

Commit 358dbc7

Browse files
author
Saurabh Kumar Bajpai
committed
fix: additional real bug fixes
1 parent c3ca2e2 commit 358dbc7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎frontend/js/app.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ class BookRenderer {
907907
<div class="handwritten-note" style="margin-bottom: 0.8rem; font-style: italic; color: #5d4037;">${safeVibe}</div>
908908
${bookData.moods && bookData.moods.length > 0 ? `
909909
<div class="book-mood-tags" style="margin-bottom: 0.8rem; display: flex; flex-wrap: wrap; gap: 4px;">
910-
${bookData.moods.map(m => `<span style="font-size: 0.6rem; background: rgba(0,0,0,0.1); padding: 2px 6px; border-radius: 10px;"><i class="fa-solid ${this.getMoodIcon(m)}"></i> ${m}</span>`).join('')}
910+
${bookData.(moods ?? []).map(m => `<span style="font-size: 0.6rem; background: rgba(0,0,0,0.1); padding: 2px 6px; border-radius: 10px;"><i class="fa-solid ${this.getMoodIcon(m)}"></i> ${m}</span>`).join('')}
911911
</div>
912912
` : ''}
913913
</div>

‎frontend/js/book-preview.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const BookPreview = (() => {
107107
el.setAttribute('aria-modal', 'true');
108108
el.setAttribute('aria-label', 'Book preview');
109109

110-
el.innerHTML = `
110+
el.textContent = `
111111
<div class="preview-modal-inner">
112112
<div class="preview-modal-header">
113113
<div class="preview-modal-title-wrap">

‎frontend/js/library-3d.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ class BookshelfRenderer3D {
10701070
const localLibrary = this.getLibraryState();
10711071
let books = [...(localLibrary[shelfType] || [])];
10721072

1073-
books = books.map(b => {
1073+
books = (books ?? []).map(b => {
10741074
if (b.volumeInfo) {
10751075
return {
10761076
id: b.id,

0 commit comments

Comments
 (0)