From 358705625a9781a8c7ce10e74a127e7eca7e2154 Mon Sep 17 00:00:00 2001 From: josc146 Date: Sat, 20 May 2023 14:55:18 +0800 Subject: [PATCH] chore --- frontend/src/pages/Downloads.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Downloads.tsx b/frontend/src/pages/Downloads.tsx index 2cd9449..7857682 100644 --- a/frontend/src/pages/Downloads.tsx +++ b/frontend/src/pages/Downloads.tsx @@ -13,7 +13,8 @@ export const Downloads: FC = observer(() => { const {t} = useTranslation(); const finishedDownloads = commonStore.downloadList.filter((status) => status.done).length; useEffect(() => { - refreshLocalModels({models: commonStore.modelSourceList}, false); + if (finishedDownloads > 0) + refreshLocalModels({models: commonStore.modelSourceList}, false); console.log('finishedDownloads:', finishedDownloads); }, [finishedDownloads]);