Skip handleDeleteCharacter when character is undefined

This commit is contained in:
artisticMink
2023-11-04 21:27:02 +01:00
parent c3ff146dd2
commit a876d098fe

View File

@ -7207,7 +7207,8 @@ function doCloseChat() {
* @param {boolean} delete_chats - Whether to delete chats or not. * @param {boolean} delete_chats - Whether to delete chats or not.
*/ */
export async function handleDeleteCharacter(popup_type, this_chid, delete_chats) { export async function handleDeleteCharacter(popup_type, this_chid, delete_chats) {
if (popup_type !== "del_ch") { if (popup_type !== "del_ch" ||
!characters[this_chid]) {
return; return;
} }