From 67bb2427780f183eb9f9a0514ec864b31f8b664f Mon Sep 17 00:00:00 2001 From: huzibaca Date: Sun, 17 Nov 2024 23:50:34 +0800 Subject: [PATCH] fix: webdav refreshes data and clears the original data when an error occurs. --- src/components/setting/mods/backup-viewer.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/setting/mods/backup-viewer.tsx b/src/components/setting/mods/backup-viewer.tsx index 4b7a370e..974b0f66 100644 --- a/src/components/setting/mods/backup-viewer.tsx +++ b/src/components/setting/mods/backup-viewer.tsx @@ -58,6 +58,8 @@ export const BackupViewer = forwardRef((props, ref) => { setBackupFiles(files); setTotal(files.length); } catch (error) { + setBackupFiles([]); + setTotal(0); console.error(error); // Notice.error(t("Failed to fetch backup files")); } finally {