Allow easier emu testing; clean up unconfigured state logic

This commit is contained in:
2026-05-03 15:14:09 -04:00
parent e3285b14e7
commit 4c97fba9f8
2 changed files with 35 additions and 22 deletions

View File

@@ -13,7 +13,7 @@ Pebble.addEventListener("appmessage", function (dict) {
const cfg = JSON.parse(localStorage.getItem('clay-settings'));
// report to user if some configuration is missing
if (cfg.CLAY_API_HOST == "" || cfg.CLAY_API_KEY == "" || cfg.CLAY_USER == "") {
if (!cfg || cfg.CLAY_API_HOST == "" || cfg.CLAY_API_KEY == "" || cfg.CLAY_USER == "") {
Pebble.sendAppMessage({ PKJS_LAST_WATCHED: "SOME APP SETTINGS ARE UNSET" });
}