Prevent cancelling "delete all" in inbox still deleting everything

This commit is contained in:
Andreas Nedbal 2022-01-14 22:30:08 +01:00 committed by Andreas Nedbal
parent 7d14e93ada
commit 435ddf2415
1 changed files with 3 additions and 1 deletions

View File

@ -39,7 +39,9 @@ export function deleteAllQuestionsHandler(event: Event): void {
cancelButtonText: I18n.translate('views.actions.cancel'),
closeOnConfirm: true
}, (returnValue) => {
if (returnValue === null) return false;
if (returnValue === false) {
return;
}
Rails.ajax({
url: '/ajax/delete_all_inbox',