This commit is contained in:
Rizky 2023-10-19 10:59:29 +00:00
parent bac25c0790
commit d0c873c830
1 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,9 @@ export const editorWS = async (p: PG) => {
}, 5000);
const decoder = new TextDecoder();
ws.addEventListener("message", async (e) => {
const raw = decoder.decode(decompress(e.data));
const raw = decoder.decode(
decompress(new Uint8Array(await e.data.arrayBuffer()))
);
const msg = JSON.parse(raw) as WS_MSG;
if (msg.type === "pong") {