mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
fix(ui): handle null chat in folder drop handler for cross-account drag (#25928)
This commit is contained in:
parent
232421f40b
commit
e5ed45fb20
1 changed files with 18 additions and 16 deletions
|
|
@ -176,24 +176,26 @@
|
|||
});
|
||||
}
|
||||
|
||||
// Move the chat
|
||||
const res = await updateChatFolderIdById(
|
||||
localStorage.token,
|
||||
chat.id,
|
||||
folderId
|
||||
).catch((error) => {
|
||||
toast.error(`${error}`);
|
||||
return null;
|
||||
});
|
||||
if (chat) {
|
||||
// Move the chat
|
||||
const res = await updateChatFolderIdById(
|
||||
localStorage.token,
|
||||
chat.id,
|
||||
folderId
|
||||
).catch((error) => {
|
||||
toast.error(`${error}`);
|
||||
return null;
|
||||
});
|
||||
|
||||
onItemMove({
|
||||
originFolderId: chat.folder_id,
|
||||
targetFolderId: folderId,
|
||||
e
|
||||
});
|
||||
onItemMove({
|
||||
originFolderId: chat.folder_id,
|
||||
targetFolderId: folderId,
|
||||
e
|
||||
});
|
||||
|
||||
if (res) {
|
||||
dispatch('update');
|
||||
if (res) {
|
||||
dispatch('update');
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue