From: Roman Bazalevsky Date: Tue, 31 Dec 2019 14:44:36 +0000 (+0300) Subject: Обработка неопределенных значений в веб-интерфейсе. X-Git-Url: https://git.rvb.name/weathermon.git/commitdiff_plain/da331fea01b7d2bc15b7628366b03b9e3ba1a395 Обработка неопределенных значений в веб-интерфейсе. --- diff --git a/openwrt-web/meteo/meteo.js b/openwrt-web/meteo/meteo.js index 9060847..36ff690 100644 --- a/openwrt-web/meteo/meteo.js +++ b/openwrt-web/meteo/meteo.js @@ -25,7 +25,7 @@ function RefreshPageState() { for (var param in returnedData[sensor_id][sensor]) { sensor_path = sensor_id+"."+sensor+"."+param; name = properties["names"][sensor_path]; - if (! name.startsWith("-")) { + if ((! name.startsWith("-")) && (name != "undefined")) { value = returnedData[sensor_id][sensor][param]; if (! name) { name = sensor_path; } units = properties["units"][sensor_path];