We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54e822d commit 1c03fa0Copy full SHA for 1c03fa0
1 file changed
src/uws.js
@@ -35,6 +35,7 @@ const toUint8Array = (value) => {
35
if (value === undefined) return new Uint8Array(0);
36
else if (typeof value === 'string') return textEncoder.encode(value);
37
else if (value instanceof ArrayBuffer) return new Uint8Array(value);
38
+ else if (value instanceof SharedArrayBuffer) return new Uint8Array(value);
39
else return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
40
};
41
0 commit comments