From edc20a1a0ad28f7aa05d30a2b6221a7527a4033e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 1 Sep 2020 10:40:04 +0200 Subject: [PATCH] Update EventsServerClient.js --- EventsServerClient.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/EventsServerClient.js b/EventsServerClient.js index 8d3c871f2..e76d3f545 100644 --- a/EventsServerClient.js +++ b/EventsServerClient.js @@ -199,8 +199,14 @@ function newEventsServerClient(networkNode) { } } } else { - networkNode.payload.uiObject.setStatus('Connected to Superalgos Backend via WebSockets.') - retryCommandsPhysics() + if (networkNode !== undefined) { + if (networkNode.payload !== undefined) { + if (networkNode.payload.uiObject !== undefined) { + networkNode.payload.uiObject.setStatus('Connected to Superalgos Backend via WebSockets.') + retryCommandsPhysics() + } + } + } } DEBUG.variable4 = 'Commands Waiting For Confirmation from WS Server: ' + commandsWaitingConfirmation.size