| 726 | 726 | const tagsToImport = tagNamesToImport.map(tag => getTag(tag, { createNew: true })); |
| 727 | 727 | const added = addTagsToEntity(tagsToImport, character.avatar); |
| 728 | 728 | |
| 729 | | - toastr.success(`Imported tags:<br />${tagsToImport.map(x => x.name).join(', ')}`, 'Importing Tags', { escapeHtml: false }); |
| 729 | + if (added) { |
| 730 | + toastr.success(`Imported tags:<br />${tagsToImport.map(x => x.name).join(', ')}`, 'Importing Tags', { escapeHtml: false }); |
| 731 | + } else { |
| 732 | + toastr.error(`Couldn't import tags:<br />${tagsToImport.map(x => x.name).join(', ')}`, 'Importing Tags', { escapeHtml: false }); |
| 733 | + } |
| 730 | 734 | |
| 731 | 735 | return added; |
| 732 | 736 | } |