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 <github@veeck.de>
This commit is contained in:
vppencilsharpener
2024-03-21 09:11:23 -04:00
committed by GitHub
parent c5f90501ef
commit d970214a0e
2 changed files with 2 additions and 1 deletions

View File

@@ -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);