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') {