From 90f07295b199b0ca20bbb7967ad8cedfa6b28e8b Mon Sep 17 00:00:00 2001 From: veeck Date: Sun, 17 Jan 2021 15:00:34 +0100 Subject: [PATCH] Add extra check for currentweather --- modules/default/weather/weather.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/default/weather/weather.js b/modules/default/weather/weather.js index a084f791..defe0ae5 100644 --- a/modules/default/weather/weather.js +++ b/modules/default/weather/weather.js @@ -154,7 +154,10 @@ Module.register("weather", { Log.log("New weather information available."); this.updateDom(0); this.scheduleUpdate(); - this.sendNotification("CURRENTWEATHER_TYPE", { type: this.weatherProvider.currentWeather().weatherType.replace("-", "_") }); + + if (this.weatherProvider.currentWeather()) { + this.sendNotification("CURRENTWEATHER_TYPE", { type: this.weatherProvider.currentWeather().weatherType.replace("-", "_") }); + } }, scheduleUpdate: function (delay = null) {