diff --git a/src/peer-connection.ts b/src/peer-connection.ts index 0451c2f..0e3557d 100644 --- a/src/peer-connection.ts +++ b/src/peer-connection.ts @@ -116,10 +116,8 @@ class PeerConnection extends EventEmitter { this.emit(PeerConnection.Events.IceCandidate, ev); }; - this.pc.onicecandidateerror = (ev: Event) => { - const event = ev as RTCPeerConnectionIceErrorEvent; - - this.emit(PeerConnection.Events.IceCandidateError, event); + this.pc.onicecandidateerror = (ev: RTCPeerConnectionIceErrorEvent) => { + this.emit(PeerConnection.Events.IceCandidateError, ev); }; }