1
0
Fork 0

Fix potential crash

master
Marco H 2022-04-29 15:45:16 +02:00
parent 6037e0323f
commit 0dae17cf70
3 changed files with 3 additions and 2 deletions

View File

@ -1,2 +1,3 @@
0.01: Initial version
0.02: Do not warn multiple times for the same exceedance
0.03: Fix crash

View File

@ -2,7 +2,7 @@
"id": "widbaroalarm",
"name": "Barometer Alarm Widget",
"shortName": "Barometer Alarm",
"version": "0.02",
"version": "0.03",
"description": "A widget that can alarm on when the pressure reaches defined thresholds.",
"icon": "widget.png",
"type": "widget",

View File

@ -104,7 +104,7 @@
saveSetting("lastHighWarningTs", 0);
}
if (!alreadyWarned) {
if (history3.length > 0 && !alreadyWarned) {
// 3h change detection
const drop3halarm = setting("drop3halarm");
const raise3halarm = setting("raise3halarm");