mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-31 15:48:51 +01:00
fix: add condition to prevent queryClient updates for specific file paths (api downloads)
This commit is contained in:
parent
c18b5c95d4
commit
e81853623f
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ export default function useAttachmentHandler(queryClient?: QueryClient) {
|
|||
return ({ data }: { data: TAttachment; submission: EventSubmission }) => {
|
||||
const { messageId } = data;
|
||||
|
||||
if (queryClient) {
|
||||
if (queryClient && !data?.filepath?.startsWith('/api/files')) {
|
||||
queryClient.setQueryData([QueryKeys.files], (oldData: TAttachment[] | undefined) => {
|
||||
return [data, ...(oldData || [])];
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue