summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-11-17 20:37:51 +0100
committerGitHub <noreply@github.com>2020-11-17 20:37:51 +0100
commitaa15f7619a77d511c1150bf1ebe7233cdf17bda2 (patch)
tree78e7f6e97cf7fa4b9d14c6196bbb2368b842fd98
parentc56a071d0c6e282dbb82aa7e69691e33f6c2fd7e (diff)
parent112e2fdfc3c46ce56ae1ed766003a1b806bcb8ba (diff)
Merge pull request #43623 from madmiraal/fix-js-lgtm-warning
Fix godot_js_websocket_send function unused assignment.
-rw-r--r--modules/websocket/library_godot_websocket.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/websocket/library_godot_websocket.js b/modules/websocket/library_godot_websocket.js
index 5d3baa0d2b..7076a6f43d 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);