mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
fix(Settings): scroll sections error
This commit is contained in:
parent
1f93175e98
commit
cb74f3be65
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ const Settings = () => {
|
|||
setSelectedSectionId(sections[sections.length - 1].id);
|
||||
} else {
|
||||
for (let i = sections.length - 1; i >= 0; i--) {
|
||||
if (sections[i].ref.current!.offsetTop - container!.offsetTop <= container!.scrollTop) {
|
||||
if (sections[i].ref.current && sections[i].ref.current!.offsetTop - container!.offsetTop <= container!.scrollTop) {
|
||||
setSelectedSectionId(sections[i].id);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue