mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Fix rounding in precipitation percentage (#3045)
Percentage should be always rounded so that we dont get something like "47.0000000001 %" Some small typo and naming fixes also while I am here --------- Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
@@ -40,7 +40,7 @@ const WeatherUtils = {
|
||||
valueUnit = valueUnit ? valueUnit : "mm";
|
||||
}
|
||||
|
||||
if (valueUnit === "%") return `${value}${valueUnit}`;
|
||||
if (valueUnit === "%") return `${value.toFixed(0)} ${valueUnit}`;
|
||||
|
||||
return `${value.toFixed(2)} ${valueUnit}`;
|
||||
},
|
||||
|
Reference in New Issue
Block a user