diff --git a/app.js b/app.js index 41d6887..13b964f 100644 --- a/app.js +++ b/app.js @@ -657,7 +657,7 @@ const consumeAudio = async (callId, socketId, rtpCapabilities) => { const isInitiator = (callId, socketId) => { console.log('isInitiator', callId, socketId); console.log('videoCalls', videoCalls); - console.log('===============videoCalls[callId].initiatorSocket.id', videoCalls[callId]?.initiatorSocket.id); + console.log('===============videoCalls[callId].initiatorSocket.id', videoCalls[callId]?.initiatorSocket?.id); console.log('===============socketId', socketId); return (videoCalls[callId]?.initiatorSocket?.id === socketId); }