Skip to content

Commit 1c03fa0

Browse files
authored
DeclarativeResponse: add SharedArrayBuffer support (#1259)
1 parent 54e822d commit 1c03fa0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/uws.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const toUint8Array = (value) => {
3535
if (value === undefined) return new Uint8Array(0);
3636
else if (typeof value === 'string') return textEncoder.encode(value);
3737
else if (value instanceof ArrayBuffer) return new Uint8Array(value);
38+
else if (value instanceof SharedArrayBuffer) return new Uint8Array(value);
3839
else return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
3940
};
4041

0 commit comments

Comments
 (0)