fix: fixed the issue where the greeting message could not be displayed when opening the debug window #918 (#1499)

### What problem does this PR solve?

fix: fixed the issue where the greeting message could not be displayed
when opening the debug window #918

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu 2024-07-12 23:39:07 +08:00 committed by GitHub
parent 38a90c32b2
commit d9868d0229
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -95,6 +95,7 @@ export const useFetchFlow = (): {
initialData: {} as IFlow,
refetchOnReconnect: false,
refetchOnMount: false,
refetchOnWindowFocus: false,
queryFn: async () => {
const { data } = await flowService.getCanvas({}, id);

View File

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