diff --git a/src/screens/whiteboard-screen/index.js b/src/screens/whiteboard-screen/index.js index cb2f8dd0..cd260828 100644 --- a/src/screens/whiteboard-screen/index.js +++ b/src/screens/whiteboard-screen/index.js @@ -17,9 +17,12 @@ const WhiteboardScreen = () => { useEffect(() => { // don't resize screen when keyboard shows setAdjustPan(); + if (!joinUrl) { + return; + } const url = new URL(joinUrl); - const getJoinUrlWithEnforceLayout = `https://${url.host}/bigbluebutton/api/getJoinUrl?sessionToken=${url.searchParams.get('sessionToken')}&enforceLayout=presentationOnly`; + const getJoinUrlWithEnforceLayout = `https://${url.host}/bigbluebutton/api/getJoinUrl?sessionToken=${url.searchParams?.get('sessionToken')}&enforceLayout=presentationOnly`; axios.get(getJoinUrlWithEnforceLayout).then((response) => { const apiResponse = response.data.response;