Fix widget drawing without having the actual widget area

master
Marco Heiming 2022-06-24 11:30:12 +02:00
parent 9c63ebf9da
commit 936702d9fc
1 changed files with 2 additions and 0 deletions

View File

@ -254,6 +254,8 @@ function draw() {
if (setting("show")) {
g.setFont("6x8", 1).setFontAlign(1, 0);
const x = this.x, y = this.y;
if (this.x == undefined)
return; // widget not yet there
if (medianPressure == undefined) {
// trigger a new check
getPressureValue();