diff --git a/app.js b/app.js index 1ea5d15..7bf0803 100644 --- a/app.js +++ b/app.js @@ -109,7 +109,7 @@ const mediaCodecs = [ const closeCall = (callId) => { try { - if (videoCalls[callId]) { + if (callId && videoCalls[callId]) { videoCalls[callId].producer?.close(); videoCalls[callId].consumer?.close(); videoCalls[callId]?.consumerTransport?.close();