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 db5a6e0 commit 7b76daeCopy full SHA for 7b76dae
fallback/encoding.js
@@ -51,10 +51,7 @@ const fromSource = (x) => {
51
if (x instanceof Uint8Array) return x
52
if (x instanceof ArrayBuffer) return new Uint8Array(x)
53
if (ArrayBuffer.isView(x)) return new Uint8Array(x.buffer, x.byteOffset, x.byteLength)
54
- if (globalThis.SharedArrayBuffer && x instanceof globalThis.SharedArrayBuffer) {
55
- return new Uint8Array(x.buffer, x.byteOffset, x.byteLength)
56
- }
57
-
+ if (globalThis.SharedArrayBuffer && x instanceof SharedArrayBuffer) return new Uint8Array(x)
58
throw new TypeError('Argument must be a SharedArrayBuffer, ArrayBuffer or ArrayBufferView')
59
}
60
0 commit comments