Fix OWM always returning preciption in mm

This commit is contained in:
Samer Albahra
2019-04-10 01:27:56 +03:00
parent bd7b522e8a
commit 0145ee4bef

View File

@@ -70,7 +70,7 @@ function getOWMWeatherData( location, callback ) {
weather.maxTemp = parseInt( data.list[ 0 ].temp.max );
weather.humidity = parseInt( data.list[ 0 ].humidity );
weather.wind = parseInt( data.list[ 0 ].speed );
weather.precip = data.list[ 0 ].rain ? parseFloat( data.list[ 0 ].rain || 0 ) : 0;
weather.precip = ( data.list[ 0 ].rain ? parseFloat( data.list[ 0 ].rain || 0 ) : 0 ) / 25.4;
weather.description = data.list[ 0 ].weather[ 0 ].description;
weather.icon = data.list[ 0 ].weather[ 0 ].icon;
weather.forecast = [];