mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
This change prevents returning '-0' (negative zero) when roundTemp is true.
This commit is contained in:
parent
e80a65a3cd
commit
e51f6597ed
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user