This commit is contained in:
parent
65139bf8d0
commit
44431c4e66
71 changed files with 2262 additions and 1173 deletions
|
|
@ -126,9 +126,13 @@ const decodePayload = (data: WebSocket.RawData): unknown => {
|
|||
return JSON.parse(new TextDecoder().decode(new Uint8Array(data))) as unknown;
|
||||
}
|
||||
if (ArrayBuffer.isView(data)) {
|
||||
return JSON.parse(new TextDecoder().decode(new Uint8Array(data.buffer, data.byteOffset, data.byteLength))) as unknown;
|
||||
return JSON.parse(
|
||||
new TextDecoder().decode(new Uint8Array(data.buffer, data.byteOffset, data.byteLength))
|
||||
) as unknown;
|
||||
}
|
||||
return JSON.parse(new TextDecoder().decode(new Uint8Array(data as unknown as ArrayBuffer))) as unknown;
|
||||
return JSON.parse(
|
||||
new TextDecoder().decode(new Uint8Array(data as unknown as ArrayBuffer))
|
||||
) as unknown;
|
||||
};
|
||||
|
||||
const run = async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue