We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e505099 commit 0e0c197Copy full SHA for 0e0c197
src/polyfill/RTCDataChannel.ts
@@ -72,12 +72,12 @@ export default class RTCDataChannel extends EventTarget implements globalThis.RT
72
});
73
74
this.#dataChannel.onMessage((data) => {
75
- if (ArrayBuffer.isView(data)) {
+ if (ArrayBuffer.isView(data)) {
76
if (this.binaryType == 'arraybuffer')
77
data = data.buffer;
78
else
79
- data = Buffer.from(data.buffer);
80
- }
+ data = Buffer.from(data.buffer);
+ }
81
82
this.dispatchEvent(new MessageEvent('message', { data }));
83
0 commit comments