Handle when no list data is provided in OWM reply

This commit is contained in:
Samer Albahra
2019-03-03 16:13:20 -06:00
parent a1486b91e0
commit 5fab1adc98

View File

@@ -58,6 +58,11 @@ function getOWMWeatherData( location, callback ) {
return;
}
if ( !weather.list ) {
callback(weather);
return;
}
var maxCount = 10;
weather.temp = 0;
weather.humidity = 0;