From e4aba422a5e6dd5ed9f75a5cac2f61dcf5950a02 Mon Sep 17 00:00:00 2001 From: jusax23 Date: Fri, 6 Oct 2023 14:41:37 +0200 Subject: [PATCH] fix --- js/quad-ws.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/quad-ws.js b/js/quad-ws.js index 7523eae..8674f53 100644 --- a/js/quad-ws.js +++ b/js/quad-ws.js @@ -42,7 +42,9 @@ function ws_open_js(url, id) { conn.state = WS_CONNECTED; }; conn.socket.onmessage = (e) => { - conn.received.push(new Uint8Array(e.data.arrayBuffer())); + e.data.arrayBuffer().then((d) => { + conn.received.push(new Uint8Array(d)); + }); }; conn.socket.onerror = (s, e) => { conn.state = WS_DISCONNECTED;