From 7c3675c9e1eb51e15fdd9b3be0f86eda10c0b9f4 Mon Sep 17 00:00:00 2001 From: "drewski3420@gmail.com" Date: Tue, 29 Dec 2020 21:07:14 -0500 Subject: [PATCH] This change prevents returning '-0' (negative zero) when roundTemp is true. --- modules/default/currentweather/currentweather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 0a43b23e..18a65855 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -587,6 +587,6 @@ Module.register("currentweather", { */ 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); } });