diff --git a/web/src/hooks/flow-hooks.ts b/web/src/hooks/flow-hooks.ts index cfdc09be9e..8bf289d8e4 100644 --- a/web/src/hooks/flow-hooks.ts +++ b/web/src/hooks/flow-hooks.ts @@ -95,6 +95,7 @@ export const useFetchFlow = (): { initialData: {} as IFlow, refetchOnReconnect: false, refetchOnMount: false, + refetchOnWindowFocus: false, queryFn: async () => { const { data } = await flowService.getCanvas({}, id); diff --git a/web/src/pages/flow/hooks.ts b/web/src/pages/flow/hooks.ts index 390844ea31..9269cae06c 100644 --- a/web/src/pages/flow/hooks.ts +++ b/web/src/pages/flow/hooks.ts @@ -374,12 +374,12 @@ export const useSaveGraphBeforeOpeningDebugDrawer = (show: () => void) => { const resetRet = await resetFlow(); // After resetting, all previous messages will be cleared. if (resetRet?.retcode === 0) { - refetch(); // fetch prologue const sendRet = await send({ id }); if (receiveMessageError(sendRet)) { message.error(sendRet?.data?.retmsg); } else { + refetch(); show(); } }