Merge pull request #2388 from drewski3420/no_negative_zero

No negative zero
This commit is contained in:
Michael Teeuw
2021-01-07 12:41:30 +01:00
committed by GitHub
4 changed files with 7 additions and 3 deletions

View File

@@ -593,6 +593,7 @@ Module.register("currentweather", {
*/
roundValue: function (temperature) {
var decimals = this.config.roundTemp ? 0 : 1;
return parseFloat(temperature).toFixed(decimals);
var roundValue = parseFloat(temperature).toFixed(decimals);
return roundValue === "-0" ? 0 : roundValue;
}
});