From 112e2fdfc3c46ce56ae1ed766003a1b806bcb8ba Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Tue, 17 Nov 2020 17:50:11 +0000 Subject: [PATCH] Fix godot_js_websocket_send function unused assignment. --- modules/websocket/library_godot_websocket.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/websocket/library_godot_websocket.js b/modules/websocket/library_godot_websocket.js index 5d3baa0d2b7..7076a6f43df 100644 --- a/modules/websocket/library_godot_websocket.js +++ b/modules/websocket/library_godot_websocket.js @@ -162,10 +162,8 @@ var GodotWebSocket = { for(i = 0; i < p_buf_len; i++) { bytes_array[i] = getValue(p_buf + i, 'i8'); } - var out = bytes_array; - if (p_raw) { - out = bytes_array.buffer; - } else { + var out = bytes_array.buffer; + if (!p_raw) { out = new TextDecoder("utf-8").decode(bytes_array); } return GodotWebSocket.send(p_id, out);