From 1dfec119bb98300c9bf931dd1b1708ce43ba32bc Mon Sep 17 00:00:00 2001 From: Fritz Jay Date: Tue, 12 Nov 2019 18:16:55 -0800 Subject: [PATCH] Fixed bug that was causing predicted amount of rain value to use DOT as a decimal separator regardless of the decimalSymbol config value. --- modules/default/weatherforecast/weatherforecast.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index c4d43ede..b8fab9e4 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -180,9 +180,9 @@ Module.register("weatherforecast",{ rainCell.innerHTML = ""; } else { if(config.units !== "imperial") { - rainCell.innerHTML = parseFloat(forecast.rain).toFixed(1) + " mm"; + rainCell.innerHTML = parseFloat(forecast.rain).toFixed(1).replace(".", this.config.decimalSymbol) + " mm"; } else { - rainCell.innerHTML = (parseFloat(forecast.rain) / 25.4).toFixed(2) + " in"; + rainCell.innerHTML = (parseFloat(forecast.rain) / 25.4).toFixed(2).replace(".", this.config.decimalSymbol) + " in"; } } rainCell.className = "align-right bright rain";