Fixed invalid units of wind.

master
David Peer 2022-02-11 13:44:14 +01:00
parent e3e2604b90
commit ce45c86301
1 changed files with 3 additions and 2 deletions

View File

@ -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
} }