Do not delete selected characters on cancel
This commit is contained in:
parent
581a1e485b
commit
a0f828a2da
|
@ -528,10 +528,14 @@ class BulkEditOverlay {
|
|||
handleContextMenuDelete = () => {
|
||||
callPopup(
|
||||
popupMessage.deleteChat(this.selectedCharacters.length), null)
|
||||
.then(deleteChats =>
|
||||
.then((accept) => {
|
||||
if (true !== accept) return;
|
||||
|
||||
const deleteChats = document.getElementById('del_char_checkbox').checked ?? false;
|
||||
|
||||
Promise.all(this.selectedCharacters.map(async characterId => CharacterContextMenu.delete(characterId, deleteChats)))
|
||||
.then(() => getCharacters())
|
||||
.then(() => this.browseState())
|
||||
.then(() => this.browseState())}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue