From 1767b84026c61747c7cc0125fac371c5f10041e0 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 2 Jul 2025 17:39:35 +0800 Subject: [PATCH] fix: Fix overview page data loading/closing exception (#9373) --- frontend/src/views/home/index.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index 36fcd3ba5..662be0082 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -406,11 +406,16 @@ const onLoadBaseInfo = async (isInit: boolean, range: string) => { statusRef.value?.acceptParams(currentInfo.value, baseInfo.value); appRef.value?.acceptParams(); if (isInit) { - timer = setInterval(async () => { - if (isActive.value && !globalStore.isOnRestart) { - await onLoadCurrentInfo(); - } - }, 3000); + try { + timer = setInterval(async () => { + if (isActive.value && !globalStore.isOnRestart) { + await onLoadCurrentInfo(); + } + }, 3000); + } finally { + clearInterval(Number(timer)); + timer = null; + } } };