Skip to content

Commit

Permalink
Prevent cancelling "delete all" in inbox still deleting everything
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeldesu committed Jan 14, 2022
1 parent 7d14e93 commit 435ddf2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/javascript/retrospring/features/inbox/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 435ddf2

Please sign in to comment.