mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-18 00:32:06 +00:00
use optional chaining
This commit is contained in:
parent
16e21b5241
commit
b2e2eb1c95
1 changed files with 2 additions and 1 deletions
|
|
@ -69,8 +69,9 @@ const Discover = ({ urlParams, queryParams }) => {
|
|||
}, [discover.selected]);
|
||||
const metaItemsContainerRef = React.useRef();
|
||||
React.useEffect(() => {
|
||||
if (((discover.catalog || {}).content || {}).type === 'Loading')
|
||||
if (discover.catalog?.content.type === 'Loading') {
|
||||
metaItemsContainerRef.current.scrollTo(0, 0);
|
||||
}
|
||||
}, [discover.catalog]);
|
||||
return (
|
||||
<MainNavBars className={styles['discover-container']} route={'discover'}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue