fix: Fix overview page data loading/closing exception (#9373)

This commit is contained in:
ssongliu 2025-07-02 17:39:35 +08:00 committed by GitHub
parent e855e7692e
commit 1767b84026
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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