From 956801c4855fa6052f1cabfd7e4c5a4bb574f618 Mon Sep 17 00:00:00 2001 From: Vlad Furman Date: Mon, 13 Nov 2023 17:00:01 +0300 Subject: [PATCH] fix: inverted the if --- src/components/Settings/Settings.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Settings/Settings.tsx b/src/components/Settings/Settings.tsx index f8f790f..15d4f54 100644 --- a/src/components/Settings/Settings.tsx +++ b/src/components/Settings/Settings.tsx @@ -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) => {