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;