ソースを参照

Fixed bug in interval for agi_runtime setting ui

Toby Chui 2 週間 前
コミット
2104839c93
1 ファイル変更8 行追加3 行削除
  1. 8 3
      src/web/SystemAO/advance/agi_runtime.html

+ 8 - 3
src/web/SystemAO/advance/agi_runtime.html

@@ -312,9 +312,14 @@
             }
 
             function updateCountdownLabel() {
-                document.getElementById("countdownText").textContent =
-                    loc("agi_runtime/auto_refresh", "Auto-refresh in {n}s")
-                        .replace("{n}", countdownSecs);
+                var el = document.getElementById("countdownText");
+                if (!el) {
+                    clearInterval(window._agiRtInterval);
+                    window._agiRtInterval = null;
+                    return;
+                }
+                el.textContent = loc("agi_runtime/auto_refresh", "Auto-refresh in {n}s")
+                    .replace("{n}", countdownSecs);
             }
 
             /* ── Toast ──────────────────────────────────────────────── */