From ed9035329eb99f3d785007b470c565f9d54c0e98 Mon Sep 17 00:00:00 2001 From: GouJ Date: Fri, 25 Sep 2026 01:00:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=BD=AE=E8=AF=A2=E5=BC=95=E7=94=A8=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/subject-images/useSubjectImages.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/features/subject-images/useSubjectImages.ts b/src/features/subject-images/useSubjectImages.ts index ffdb59d..b79458d 100644 --- a/src/features/subject-images/useSubjectImages.ts +++ b/src/features/subject-images/useSubjectImages.ts @@ -34,9 +34,9 @@ export function useSubjectImages() { async (projectId, signal) => ({ profile: await generationConfigApi.profile(projectId, signal) }), false ) - let query!: ReturnType>>> - const pollInterval = computed(() => queryDataHasRunningImages(query?.data.value ?? null) ? 4000 : false) - query = usePolling( + const queryRef = {} as { current?: ReturnType>>> } + const pollInterval = computed(() => queryDataHasRunningImages(queryRef.current?.data.value ?? null) ? 4000 : false) + const query = usePolling( id, async (projectId, signal) => { if (!projectId) return [] @@ -62,6 +62,7 @@ export function useSubjectImages() { }, pollInterval ) + queryRef.current = query const forms = computed(() => query.data.value ?? []) const operation = computed(() => getOperation(id.value)) const session = computed(() => getImageSession(id.value))