From 8829a6cbb200b2d8e7caef8c6e358ac327095ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Sun, 22 Oct 2023 15:45:18 +0800 Subject: [PATCH] =?UTF-8?q?DEBUG:=20candidate=20=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index ee09054..66f0c23 100644 --- a/src/client.js +++ b/src/client.js @@ -119,7 +119,7 @@ export default class ClientList { } webrtc.oniceconnectionstatechange = async event => { if (webrtc.iceConnectionState === 'disconnected' || webrtc.iceConnectionState === 'failed') { - const client = this.clientlist.find(x => x.id === data.id) + const client = this.clientlist.find(x => x.id === data.id) ?? {} console.error(data.name, '需要添加新的 candidate', client.online) // 添加新的 candidate } else if (webrtc.iceConnectionState === 'connected' || webrtc.iceConnectionState === 'completed') {