mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-01 16:15:07 +08:00
Fix: After deleting all conversation lists, the chat input box can still be used for input. #4907 (#4909)
### What problem does this PR solve? Fix: After deleting all conversation lists, the chat input box can still be used for input. #4907 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -253,8 +253,12 @@ export const useFetchNextConversationList = () => {
|
||||
enabled: !!dialogId,
|
||||
queryFn: async () => {
|
||||
const { data } = await chatService.listConversation({ dialogId });
|
||||
if (data.code === 0 && data.data.length > 0) {
|
||||
handleClickConversation(data.data[0].id, '');
|
||||
if (data.code === 0) {
|
||||
if (data.data.length > 0) {
|
||||
handleClickConversation(data.data[0].id, '');
|
||||
} else {
|
||||
handleClickConversation('', '');
|
||||
}
|
||||
}
|
||||
return data?.data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user