We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eecf1f3 commit ce99c1cCopy full SHA for ce99c1c
source/funkin/backend/system/net/WebSocketUtil.hx
@@ -235,10 +235,12 @@ class WebSocketUtil implements IFlxDestroyable {
235
/**
236
* Sends data to the server
237
**/
238
- public function send(data) {
239
- if (data is WebSocketPacket) data = data.toString();
+ public function send(data) {
+ var _data = null;
240
+ if (data is WebSocketPacket) _data = data.toString();
241
+ else _data = data;
242
try {
- this.webSocket.send(data);
243
+ this.webSocket.send(_data);
244
} catch(e) {
245
this.onError(e);
246
}
0 commit comments