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; + } } };