From a539325f7ace026b66dc67c39b18f8ee3d522f26 Mon Sep 17 00:00:00 2001 From: Marco Heiming Date: Sat, 15 Jan 2022 10:41:50 +0100 Subject: [PATCH] Write "?" when no sun progress data is available --- apps/circlesclock/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js index 0b7879e49..1d6163b0e 100644 --- a/apps/circlesclock/app.js +++ b/apps/circlesclock/app.js @@ -324,12 +324,12 @@ function drawSunProgress(w) { icon = sunSetDown; } + let text = "?"; const times = getSunData(); if (times != undefined) { const sunRise = Math.round(times.sunrise.getTime() / 1000); const sunSet = Math.round(times.sunset.getTime() / 1000); const now = Math.round(new Date().getTime() / 1000); - let text; if (now > sunRise && now < sunSet) { text = formatSeconds(sunSet - now); } else {