mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 15:52:02 +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);
|
setSelectedSectionId(sections[sections.length - 1].id);
|
||||||
} else {
|
} else {
|
||||||
for (let i = sections.length - 1; i >= 0; i--) {
|
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);
|
setSelectedSectionId(sections[i].id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue