fix(ui): handle null chat in folder drop handler for cross-account drag (#25928)
This commit is contained in:
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) {
|
||||||
|
|||||||
Reference in new issue
Block a user