Skip to content

High performance self-hosted photo and video management solution.

fix: hide scrollbar when the asset grid is empty (#12217)

martinefdf1b49f457
diff --git a/web/src/lib/components/photos-page/asset-grid.svelte b/web/src/lib/components/photos-page/asset-grid.svelte
index 40dc79c4f2..94e7803b97 100644
--- a/web/src/lib/components/photos-page/asset-grid.svelte
+++ b/web/src/lib/components/photos-page/asset-grid.svelte
@@ -762,20 +762,21 @@
{#if showShortcuts}
<ShowShortcuts on:close={() => (showShortcuts = !showShortcuts)} />
{/if}
-
-<Scrubber
- invisible={showSkeleton}
- {assetStore}
- height={safeViewport.height}
- timelineTopOffset={topSectionHeight}
- timelineBottomOffset={bottomSectionHeight}
- {leadout}
- {scrubOverallPercent}
- {scrubBucketPercent}
- {scrubBucket}
- {onScrub}
- {stopScrub}
-/>
+{#if assetStore.buckets.length > 0}
+ <Scrubber
+ invisible={showSkeleton}
+ {assetStore}
+ height={safeViewport.height}
+ timelineTopOffset={topSectionHeight}
+ timelineBottomOffset={bottomSectionHeight}
+ {leadout}
+ {scrubOverallPercent}
+ {scrubBucketPercent}
+ {scrubBucket}
+ {onScrub}
+ {stopScrub}
+ />
+{/if}
<!-- Right margin MUST be equal to the width of immich-scrubbable-scrollbar -->
<section