mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
Merge pull request #1808 from FritzJay/develop
Use config.decimalSymbol when displaying the predicted amount of rain in weatherforecast
This commit is contained in:
commit
73be6c35a6
@ -25,6 +25,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
### Updated
|
||||
|
||||
### Fixed
|
||||
- Fixed issue in weatherforecast module where predicted amount of rain was not using the decimal symbol specified in config.js.
|
||||
|
||||
## [2.9.0] - 2019-10-01
|
||||
|
||||
|
@ -180,9 +180,9 @@ Module.register("weatherforecast",{
|
||||
rainCell.innerHTML = "";
|
||||
} else {
|
||||
if(config.units !== "imperial") {
|
||||
rainCell.innerHTML = parseFloat(forecast.rain).toFixed(1) + " mm";
|
||||
rainCell.innerHTML = parseFloat(forecast.rain).toFixed(1).replace(".", this.config.decimalSymbol) + " mm";
|
||||
} else {
|
||||
rainCell.innerHTML = (parseFloat(forecast.rain) / 25.4).toFixed(2) + " in";
|
||||
rainCell.innerHTML = (parseFloat(forecast.rain) / 25.4).toFixed(2).replace(".", this.config.decimalSymbol) + " in";
|
||||
}
|
||||
}
|
||||
rainCell.className = "align-right bright rain";
|
||||
|
Loading…
x
Reference in New Issue
Block a user