From 12d4e19707b611f359483fa55e7d6ec650de5321 Mon Sep 17 00:00:00 2001 From: arteck <6681528+arteck@users.noreply.github.com> Date: Wed, 18 Oct 2023 19:31:11 +0200 Subject: [PATCH] Update main.js --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index cb6d026..0a2c1ec 100644 --- a/main.js +++ b/main.js @@ -167,7 +167,9 @@ class judoisoftControll extends utils.Adapter { } else { this.log.info("reconnect " + Date.now()); _tokenData = await this.getTokenFirst(); - conResult = await axios.get(baseUrl + "?token=" + _tokenData + "&group=register&command=get%20device%20data", {httpsAgent: agent}); + if (_tokenData != null) { + conResult = await axios.get(baseUrl + "?token=" + _tokenData + "&group=register&command=get%20device%20data", {httpsAgent: agent}); + } } let result;