Skip to content

Commit

Permalink
fix: inverted the if
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruminat committed Nov 13, 2023
1 parent 2971ed7 commit 956801c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ function SettingsContent({
}, [selectionInitialPage]);

React.useEffect(() => {
if (!selected.selectedRef?.current) return;

selected.selectedRef.current.scrollIntoView();
if (selected.selectedRef?.current) {
selected.selectedRef.current.scrollIntoView();
}
}, [selected.selectedRef]);

const renderSetting = ({title: settingTitle, element}: SettingsItem) => {
Expand Down

0 comments on commit 956801c

Please sign in to comment.