Prevent duplicate toasts

This commit is contained in:
Cohee
2024-09-13 11:22:12 +00:00
parent 620847c4d6
commit 8dd7a97eb3
2 changed files with 3 additions and 3 deletions

View File

@ -4413,7 +4413,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
generatedPromptCache = '';
if (data?.response) {
toastr.error(data.response, 'API Error');
toastr.error(data.response, 'API Error', { preventDuplicates: true });
}
throw new Error(data?.response);
}