Revert export removal

This commit is contained in:
Cohee
2024-05-23 01:47:06 +03:00
parent 92cb70213a
commit a11231dd2e

View File

@@ -8454,7 +8454,7 @@ function doCloseChat() {
* @param {string} this_chid - The character ID to be deleted. * @param {string} this_chid - The character ID to be deleted.
* @param {boolean} delete_chats - Whether to delete chats or not. * @param {boolean} delete_chats - Whether to delete chats or not.
*/ */
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]) { !characters[this_chid]) {
return; return;
@@ -8472,7 +8472,7 @@ async function handleDeleteCharacter(popup_type, this_chid, delete_chats) {
* @return {Promise<void>} - A promise that resolves when the character is successfully deleted * @return {Promise<void>} - A promise that resolves when the character is successfully deleted
*/ */
export async function deleteCharacter(characterKey, { deleteChats = true } = {}) { export async function deleteCharacter(characterKey, { deleteChats = true } = {}) {
const character = characters.find(x => x.avatar == characterKey);; const character = characters.find(x => x.avatar == characterKey);
if (!character) { if (!character) {
toastr.warning(`Character ${characterKey} not found. Cannot be deleted.`); toastr.warning(`Character ${characterKey} not found. Cannot be deleted.`);
return; return;