From f6290127128164300ef13c8499d46d1498824e24 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Thu, 15 Sep 2022 09:32:41 +0300 Subject: [PATCH] LINXD-2209: Check for router in videoCalls --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 0f2bfab..bf092c8 100644 --- a/app.js +++ b/app.js @@ -118,7 +118,7 @@ peers.on('connection', async socket => { }) socket.on('createRoom', async ({ callId }, callback) => { - if (videoCalls[callId].router === undefined) { + if (videoCalls[callId]?.router === undefined) { console.log('[createRoom] callId', callId); videoCalls[callId].router = await worker.createRouter({ mediaCodecs }); console.log(`[createRoom] Router ID: ${videoCalls[callId].router.id}`)