Fix empty toast suppression

This commit is contained in:
Cohee 2024-06-28 10:22:26 +00:00
parent 46830a27d0
commit e713b32bdc

View File

@ -3295,9 +3295,9 @@ export async function executeSlashCommandsOnChatInput(text, options = {}) {
document.querySelector('#form_sheld').classList.add('script_error');
result = new SlashCommandClosureResult();
result.isError = true;
result.errorMessage = e.message;
if (e.cause !== 'abort' && e.message) {
toastr.error(e.message);
result.errorMessage = e.message || 'An unknown error occurred';
if (e.cause !== 'abort') {
toastr.error(result.errorMessage);
}
} finally {
delay(1000).then(() => clearCommandProgressDebounced());