Auto-register posts for updates

This commit is contained in:
2020-04-01 18:45:29 +02:00
parent 27d7c526b8
commit f3cf290822
3 changed files with 62 additions and 5 deletions

View File

@ -136,7 +136,7 @@ class UserWebSocket {
static SendRequest(title, data) {
// Send request
return new Promise((res, err) => {
if(this.ws.readyState != WebSocket.OPEN)
if(!this.hasOwnProperty("ws") || this.ws.readyState != WebSocket.OPEN)
throw new Error("WebSocket is not open!");
// Determine unique request ID