this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Ok need to check if navigation is undefined

+3 -2
+3 -2
src/pages/status.jsx
··· 179 179 const showMedia = parseInt(mediaParam, 10) > 0; 180 180 const firstLoad = useRef( 181 181 !states.prevLocation && 182 - (history.length === 1 || navigation?.entries?.()?.length === 1), 182 + (history.length === 1 || 183 + ('navigation' in window && navigation?.entries?.()?.length === 1)), 183 184 ); 184 185 const [viewMode, setViewMode] = useState( 185 186 searchParams.get('view') || firstLoad.current ? 'full' : null, ··· 879 880 880 881 const prevLocationIsStatusPage = useMemo(() => { 881 882 // Navigation API 882 - if (navigation?.entries) { 883 + if ('navigation' in window && navigation?.entries) { 883 884 const prevEntry = navigation.entries()[navigation.currentEntry.index - 1]; 884 885 if (prevEntry?.url) { 885 886 return STATUS_URL_REGEX.test(prevEntry.url);