Skip to content

Commit

Permalink
fix: crash when no pinned hosts on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Clovis committed Nov 2, 2024
1 parent e253696 commit 2044309
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/soapbox/components/thumb_navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { openSidebar } from 'soapbox/actions/sidebar';
import ThumbNavigationLink from 'soapbox/components/thumb_navigation-link';
import { Text } from 'soapbox/components/ui';
import { useAppSelector, useLogo, useOwnAccount } from 'soapbox/hooks';
import instance from 'soapbox/reducers/instance';
import { getFeatures } from 'soapbox/utils/features';

import { Avatar } from './ui';
Expand All @@ -29,7 +28,7 @@ const PinnedHosts = () => {

useEffect(() => {
setBottom(calculateBottom(node.current));
node.current.scrollBy(0, 100000000);
node.current?.scrollBy(0, 100000000);
}, [pinnedHosts]);

if (pinnedHosts.isEmpty()) return null;
Expand Down

0 comments on commit 2044309

Please sign in to comment.