From d970214a0e438bbcfcfcfcd17b4c2457af51a83b Mon Sep 17 00:00:00 2001 From: vppencilsharpener Date: Thu, 21 Mar 2024 09:11:23 -0400 Subject: [PATCH] Fix for #3345 - precipitation probability not displayed when it is 0% (#3346) Fixes issue #3345. I think I submitted this correctly, but don't do this often so let me know if anything needs to be corrected. --------- Co-authored-by: Veeck --- CHANGELOG.md | 1 + modules/default/weather/weather.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e119659..2134e2b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ _This release is scheduled to be released on 2024-04-01._ - Worked around several issues in the RRULE library that were causing deleted calender events to still show, some initial and recurring events to not show, and some event times to be off an hour. (#3291) - Skip changelog requirement when running tests for dependency updates (#3320) +- Display precipitation probability when it is 0% instead of blank/empty (#3345) - [newsfeed] Suppress unsightly animation cases when there are 0 or 1 active news items (#3336) - [newsfeed] Always compute the feed item URL using the same helper function (#3336) - Ignore all custom css files (#3359) diff --git a/modules/default/weather/weather.js b/modules/default/weather/weather.js index f6925625..224aba06 100644 --- a/modules/default/weather/weather.js +++ b/modules/default/weather/weather.js @@ -233,7 +233,7 @@ Module.register("weather", { } } } else if (type === "precip") { - if (value === null || isNaN(value) || value === 0 || value.toFixed(2) === "0.00") { + if (value === null || isNaN(value)) { formattedValue = ""; } else { formattedValue = WeatherUtils.convertPrecipitationUnit(value, valueUnit, this.config.units);