Fixed invalid units of wind.
parent
e3e2604b90
commit
ce45c86301
|
|
@ -501,8 +501,9 @@ function getWeather(){
|
||||||
weather.hum = weather.hum + "%";
|
weather.hum = weather.hum + "%";
|
||||||
|
|
||||||
// Wind
|
// Wind
|
||||||
var speedFactor = settings.speed == "kph" ? 1.60934 : 1.0;
|
const wind = locale.speed(weather.wind).match(/^(\D*\d*)(.*)$/);
|
||||||
weather.wind = Math.round(weather.wind * speedFactor);
|
var speedFactor = settings.speed == "kph" ? 1.0 : 1.0 / 1.60934;
|
||||||
|
weather.wind = Math.round(wind[1] * speedFactor);
|
||||||
|
|
||||||
return weather
|
return weather
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue