diff --git a/custom/shared/contexts/CallProvider.js b/custom/shared/contexts/CallProvider.js index 62b6919..5e8ad4d 100644 --- a/custom/shared/contexts/CallProvider.js +++ b/custom/shared/contexts/CallProvider.js @@ -52,12 +52,11 @@ export const CallProvider = ({ if (!daily) return; const updateRoomConfigState = async () => { const roomConfig = await daily.room(); - if (!('config' in roomConfig)) return; + const config = roomConfig?.config; + if (!config) return; - if (roomConfig?.config?.exp) { - setRoomExp( - roomConfig?.config?.exp * 1000 || Date.now() + 1 * 60 * 1000 - ); + if (config.exp) { + setRoomExp(config.exp * 1000 || Date.now() + 1 * 60 * 1000); } const browser = Bowser.parse(window.navigator.userAgent); const recordingType =