diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index c018524d9..540193f1d 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -516,13 +516,12 @@ var ProtocolsIndex = (function() { url: $el.data('url'), data: JSON.stringify({ ids: rowsSelected }), contentType: 'application/json' - }, - (data) => { - animateSpinner(null, false); - HelperModule.flashAlertMsg(data.message, 'success'); - reloadTable(); } - ).error((data) => { + ).success((data) => { + animateSpinner(null, false); + HelperModule.flashAlertMsg(data.message, 'success'); + reloadTable(); + }).error((data) => { animateSpinner(null, false); HelperModule.flashAlertMsg(data.responseJSON.message, 'danger'); });