Open austinkelleher opened 5 years ago
An uncaught exception will occur if WebSocketSend is called after the ws property on the instance has already been deleted here: https://github.com/jirihybek/unity-websocket-webgl/blob/master/Plugins/WebSocket.jslib#L205
WebSocketSend
ws
Uncaught TypeError: Cannot read property 'readyState' of undefined
This is because the WebSocketSend method only checks for null, but in this case the value would be undefined here: https://github.com/jirihybek/unity-websocket-webgl/blob/master/Plugins/WebSocket.jslib#L258
null
undefined
I will have a PR with the fix momentarily.
This PR fixed my problem. Thank you very much.
An uncaught exception will occur if
WebSocketSend
is called after thews
property on the instance has already been deleted here: https://github.com/jirihybek/unity-websocket-webgl/blob/master/Plugins/WebSocket.jslib#L205This is because the
WebSocketSend
method only checks fornull
, but in this case the value would beundefined
here: https://github.com/jirihybek/unity-websocket-webgl/blob/master/Plugins/WebSocket.jslib#L258I will have a PR with the fix momentarily.