Skip to content

Commit

Permalink
fix: update webrtc polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidsowardx authored and xstelea committed Sep 13, 2023
1 parent 7d6375d commit ad94b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const polyfillWebRTC = () => {
globalThis.RTCPeerConnection = RTCPeerConnection
globalThis.RTCIceCandidate = RTCIceCandidate
globalThis.RTCSessionDescription = RTCSessionDescription
} else if (!global.RTCPeerConnection) {
} else if (typeof global !== 'undefined' && !global.RTCPeerConnection) {
global.RTCPeerConnection = RTCPeerConnection
global.RTCIceCandidate = RTCIceCandidate
global.RTCSessionDescription = RTCSessionDescription
Expand Down

0 comments on commit ad94b04

Please sign in to comment.