fix(ui): handle null chat in folder drop handler for cross-account drag (#25928)

This commit is contained in:
G30 authored and GitHub committed 2026-06-17 00:26:35 +02:00
1 parent 232421f40b
commit e5ed45fb20
1 file changed
+18 -16
@@ -176,24 +176,26 @@
}); });
} }
// Move the chat if (chat) {
const res = await updateChatFolderIdById( // Move the chat
localStorage.token, const res = await updateChatFolderIdById(
chat.id, localStorage.token,
folderId chat.id,
).catch((error) => { folderId
toast.error(`${error}`); ).catch((error) => {
return null; toast.error(`${error}`);
}); return null;
});
onItemMove({ onItemMove({
originFolderId: chat.folder_id, originFolderId: chat.folder_id,
targetFolderId: folderId, targetFolderId: folderId,
e e
}); });
if (res) { if (res) {
dispatch('update'); dispatch('update');
}
} }
} }
} catch (error) { } catch (error) {