diff --git a/web/src/lib/components/shared-components/scrollbar/scrollbar.svelte b/web/src/lib/components/shared-components/scrollbar/scrollbar.svelte index 045cea950a..f47053be3d 100644 --- a/web/src/lib/components/shared-components/scrollbar/scrollbar.svelte +++ b/web/src/lib/components/shared-components/scrollbar/scrollbar.svelte @@ -42,8 +42,8 @@ segment.timeGroup = bucket.bucketDate; segment.date = fromLocalDateTime(segment.timeGroup); - if (prev?.date.year !== segment.date.year && (!prev || height > MIN_YEAR_LABEL_DISTANCE)) { - segment.hasLabel = true; + if (prev && prev!.date.year !== segment.date.year && height > MIN_YEAR_LABEL_DISTANCE) { + prev.hasLabel = true; height = 0; } @@ -134,7 +134,7 @@ {#if segment.hasLabel}