mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-05-25 01:02:30 +00:00
fix: respect selectedVideoId
This commit is contained in:
parent
f85991dd8b
commit
4bf2542643
1 changed files with 2 additions and 1 deletions
|
|
@ -93,7 +93,8 @@ const VideosList = ({ className, metaItem, libraryItem, season, seasonOnSelect,
|
|||
isMountedRef.current = true;
|
||||
return;
|
||||
}
|
||||
if (videosContainerRef.current) {
|
||||
const hasSelectedVideo = videosForSeason.some((v) => v.id === selectedVideoId);
|
||||
if (!hasSelectedVideo && videosContainerRef.current) {
|
||||
videosContainerRef.current.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
}
|
||||
}, [selectedSeason]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue