fix
This commit is contained in:
parent
bac25c0790
commit
d0c873c830
|
|
@ -101,7 +101,9 @@ export const editorWS = async (p: PG) => {
|
||||||
}, 5000);
|
}, 5000);
|
||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
ws.addEventListener("message", async (e) => {
|
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;
|
const msg = JSON.parse(raw) as WS_MSG;
|
||||||
|
|
||||||
if (msg.type === "pong") {
|
if (msg.type === "pong") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue