mirror of
				https://github.com/MichMich/MagicMirror.git
				synced 2025-10-31 18:54:51 +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