Skip to content

Commit 51a43eb

Browse files
committed
fix: render slide bullets when content is empty
1 parent 747b6f7 commit 51a43eb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ function generatePreviewHTML(doc: OSFDocument): string {
442442
case 'slide':
443443
html += '<div class="mb-6 p-4 border-2 border-gray-200 bg-gray-50">';
444444
html += `<h2 class="text-xl font-bold mb-3">${escapeHTML(block.title || 'Slide')}</h2>`;
445-
if (block.content) {
445+
if (block.content && block.content.length > 0) {
446446
html += renderSlideContentHTML(block.content);
447447
} else if (block.bullets && block.bullets.length > 0) {
448448
html += '<ul class="list-disc pl-6 my-2">';

app/playground/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ function generatePreviewHTML(doc: OSFDocument): string {
308308
case 'slide':
309309
html += '<div class="mb-8 p-6 border-2 border-blue-500 bg-blue-900 bg-opacity-20 rounded">';
310310
html += `<h2 class="text-2xl font-bold mb-4">${block.title || 'Slide'}</h2>`;
311-
if (block.content) {
311+
if (block.content && block.content.length > 0) {
312312
html += renderSlideContentHTML(block.content);
313313
} else if (block.bullets && block.bullets.length > 0) {
314314
html += '<ul class="list-disc pl-6 my-2">';

0 commit comments

Comments
 (0)