From 4271f555bc38d6512640eb0c7ab8d43e3915ed9d Mon Sep 17 00:00:00 2001 From: fengyarnom Date: Fri, 30 May 2025 21:30:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E4=B8=80=E4=BA=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/index.html b/templates/index.html index 34a5c32..f89aab3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -338,6 +338,12 @@ function setupAutoRefresh() { const autoRefreshCheckbox = document.getElementById('autoRefresh'); + // 如果自动刷新复选框不存在,直接返回 + if (!autoRefreshCheckbox) { + console.log('自动刷新功能未启用(元素不存在)'); + return; + } + // 初始化自动刷新 if (autoRefreshCheckbox.checked) { startAutoRefresh();