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) {