1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
enter-a-random-username 2025-03-30 11:03:15 -04:00 committed by GitHub
commit 6cbc50cb09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,7 +76,7 @@ function scrollToWindow({
let scrollToPosition: number;
if (direction === ScrollDirection.RIGHT) {
const nextItem = items[lastVisibleIndex];
const nextItem = items[lastVisibleIndex] || items[lastVisibleIndex - 1];
// This will be the position to anchor the item at `lastVisibleIndex` to the start of the view window.
const nextItemScrollOffset = lastVisibleIndex * nextItem.offsetWidth;