Bug fixed, deleting UIObjects while not connected over websockets

This commit is contained in:
Luis Fernando Molina committed 2020-03-26 17:16:47 +01:00
1 parent 5a7f84afe3
commit 6c65700893
5 files changed
+19 -6

No files matched your search

+3 -1
View File
@@ -44,7 +44,9 @@ function newSystemEventHandler () {
responseWaiters.set(command.callerId, responseCallBack)
}
WEB_SOCKETS_CONNECTION.send(JSON.stringify(command))
if (WEB_SOCKETS_CONNECTION.readyState === 1) { // 1 means connected and ready.
WEB_SOCKETS_CONNECTION.send(JSON.stringify(command))
}
}
function createEventHandler (eventHandlerName, callerId, responseCallBack) {