Fix deletion of the first char in the list

This commit is contained in:
Cohee 2025-02-28 10:18:57 +02:00
parent 2df140a6a9
commit f33464527b

View File

@ -10283,7 +10283,7 @@ jQuery(async function () {
$('#form_create').submit(createOrEditCharacter);
$('#delete_button').on('click', async function () {
if (!this_chid) {
if (this_chid === undefined || !characters[this_chid]) {
toastr.warning('No character selected.');
return;
}