mirror of
https://github.com/MagicMirrorOrg/MagicMirror.git
synced 2026-01-11 00:58:11 -05:00
This change prevents returning '-0' (negative zero) when roundTemp is true.
This commit is contained in:
@@ -181,7 +181,7 @@ Module.register("weather", {
|
||||
|
||||
roundValue: function (temperature) {
|
||||
var decimals = this.config.roundTemp ? 0 : 1;
|
||||
return parseFloat(temperature).toFixed(decimals);
|
||||
return parseFloat(Math.abs(temperature) < 0.5 && this.config.roundTemp ? 0 : temperature).toFixed(decimals);
|
||||
},
|
||||
|
||||
addFilters() {
|
||||
|
||||
Reference in New Issue
Block a user