抛异常

This commit is contained in:
2026-05-12 22:15:32 +08:00
parent 6f0b573335
commit eae60714b4

View File

@@ -202,7 +202,9 @@ export class WebSocketSignaling extends EventTarget {
{ {
let parsed = msg.data; let parsed = msg.data;
if (typeof msg.data === 'string') { if (typeof msg.data === 'string') {
try { parsed = JSON.parse(msg.data); } catch(e) {} try { parsed = JSON.parse(msg.data); } catch(e) {
Logger.error(`Signaling: on-message, error: ${e}`);
}
} }
if (msg.participantId) { if (msg.participantId) {
parsed.participantId = msg.participantId; parsed.participantId = msg.participantId;