From 089cdf0ceb88e04ce99be20782852a617136df89 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 12 Jul 2026 16:57:44 +0200 Subject: [PATCH] Coerce `enableTimer` text with `Number()` for consistency The startup timer setup used `Math.trunc(enaT.text())` while `countDown()` uses `Math.trunc(Number(enaT.text()))`. Both work (the stored value is a clean millisecond timestamp), but wrap the value in `Number()` here too so the two call sites read the `#enableTimer` text identically. Signed-off-by: DL6ER --- scripts/js/footer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index a6bddcf8..24533bf4 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -615,7 +615,7 @@ $(() => { } const enaT = $("#enableTimer"); - const target = new Date(Math.trunc(enaT.text())); + const target = new Date(Math.trunc(Number(enaT.text()))); const seconds = Math.round((target.getTime() - Date.now()) / 1000); if (seconds > 0) { setTimeout(countDown, 100);