mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Prevent currentweather module from crashing.
This commit is contained in:
@@ -217,6 +217,13 @@ Module.register("currentweather",{
|
||||
* argument data object - Weather information received form openweather.org.
|
||||
*/
|
||||
processWeather: function(data) {
|
||||
|
||||
if (!data || !data.main || !data.main.temp) {
|
||||
// Did not receive usable new data.
|
||||
// Maybe this needs a better check?
|
||||
return;
|
||||
}
|
||||
|
||||
this.temperature = this.roundValue(data.main.temp);
|
||||
|
||||
if (this.config.useBeaufort){
|
||||
|
Reference in New Issue
Block a user