Update widget.js

master^2
RKBoss6 2025-07-26 10:18:19 -04:00 committed by GitHub
parent 45df9b3cfa
commit c06255dfb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,11 @@
function draw() { function draw() {
let batt=E.getBattery(); let batt=E.getBattery();
let data = require("smartbatt").get(); try {
data = require("smartbatt").get();
} catch (e) {
data.hrsLeft = 0;
}
let hrsLeft=data.hrsLeft; let hrsLeft=data.hrsLeft;
let days = hrsLeft / 24; let days = hrsLeft / 24;