Timothy Jaeryang Baek 3 weeks ago
parent
commit
24971ffce0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lib/components/common/FileItemModal.svelte

+ 2 - 2
src/lib/components/common/FileItemModal.svelte

@@ -236,7 +236,7 @@
 						/>
 					{:else}
 						<div class="max-h-96 overflow-scroll scrollbar-hidden text-xs whitespace-pre-wrap">
-							{item?.file?.data?.content ?? 'No content'}
+							{(item?.file?.data?.content ?? '').trim() || 'No content'}
 						</div>
 					{/if}
 				{:else}
@@ -251,7 +251,7 @@
 
 					{#if item?.file?.data}
 						<div class="max-h-96 overflow-scroll scrollbar-hidden text-xs whitespace-pre-wrap">
-							{item?.file?.data?.content ?? 'No content'}
+							{(item?.file?.data?.content ?? '').trim() || 'No content'}
 						</div>
 					{/if}
 				{/if}