More clear message for character import failure

This commit is contained in:
Cohee
2023-08-01 18:13:50 +03:00
parent 7f86551ab4
commit 72974d8a54
2 changed files with 10 additions and 0 deletions

View File

@@ -6838,6 +6838,11 @@ function importCharacter(file) {
contentType: false,
processData: false,
success: async function (data) {
if (data.error) {
toastr.error('The file is likely invalid or corrupted.', 'Could not import character');
return;
}
if (data.file_name !== undefined) {
$('#character_search_bar').val('').trigger('input');
$("#rm_info_block").transition({ opacity: 0, duration: 0 });