fix(panel): resolve duplicate polling timer declaration causing JS execution failure
Release / Build & Release (push) Canceled after 0s

This commit is contained in:
kory
2026-10-02 00:45:10 +08:00
parent 601a0b6e25
commit a5620cb9c4
-18
View File
@@ -384,21 +384,3 @@ document.addEventListener("visibilitychange", () => {
} }
}); });
loadWebhooks().catch(console.error); loadWebhooks().catch(console.error);
// 开启 5 秒平滑实时自动轮询
let devicePollTimer = null;
function startDevicePolling() {
if (devicePollTimer) clearInterval(devicePollTimer);
devicePollTimer = setInterval(() => {
if (!document.hidden) {
loadDevices().catch(console.error);
}
}, 5000);
}
startDevicePolling();
document.addEventListener("visibilitychange", () => {
if (!document.hidden) {
loadDevices().catch(console.error);
}
});