diff --git a/frontend/app/components/Session/Player/LivePlayer/LivePlayerSubHeader.tsx b/frontend/app/components/Session/Player/LivePlayer/LivePlayerSubHeader.tsx index 6080fd641..fed51c4b7 100644 --- a/frontend/app/components/Session/Player/LivePlayer/LivePlayerSubHeader.tsx +++ b/frontend/app/components/Session/Player/LivePlayer/LivePlayerSubHeader.tsx @@ -6,14 +6,11 @@ import Tab from 'Components/Session/Player/SharedComponents/Tab'; function SubHeader() { const { store } = React.useContext(PlayerContext); - const { currentTab, tabs, location: currentLocation = '' } = store.get(); + const { currentTab, tabs = new Set('back-compat'), location: currentLocation = 'loading...' } = store.get(); - const location = - currentLocation !== undefined - ? currentLocation.length > 70 + const location = currentLocation.length > 70 ? `${currentLocation.slice(0, 70)}...` - : currentLocation - : undefined; + : currentLocation; return ( <> diff --git a/frontend/app/components/Session_/Subheader.js b/frontend/app/components/Session_/Subheader.js index 561e95a0c..7fa22a2f7 100644 --- a/frontend/app/components/Session_/Subheader.js +++ b/frontend/app/components/Session_/Subheader.js @@ -21,7 +21,7 @@ function SubHeader(props) { const defaultLocalhostWarn = localStorage.getItem(localhostWarnKey) !== '1'; const [showWarningModal, setWarning] = React.useState(defaultLocalhostWarn); const { player, store } = React.useContext(PlayerContext); - const { width, height, endTime, location: currentLocation = '', tabs, currentTab } = store.get(); + const { width, height, endTime, location: currentLocation = 'loading...', tabs = new Set('back-compat'), currentTab } = store.get(); const enabledIntegration = useMemo(() => { const { integrations } = props;