mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 17:15:48 +00:00
fix: library crashing when 0 items are present
This commit is contained in:
parent
27c8263d8d
commit
b9bc10498d
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ const Library = ({ model, urlParams, queryParams }) => {
|
|||
}, [hasNextPage, loadNextPage]);
|
||||
const onScroll = useOnScrollToBottom(onScrollToBottom, SCROLL_TO_BOTTOM_TRESHOLD);
|
||||
React.useLayoutEffect(() => {
|
||||
if (profile.auth !== null && library.selected && library.selected.request.page === 1) {
|
||||
if (profile.auth !== null && library.selected && library.selected.request.page === 1 && library.catalog.length !== 0 ) {
|
||||
scrollContainerRef.current.scrollTop = 0;
|
||||
}
|
||||
}, [profile.auth, library.selected]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue