mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-15 09:46:06 +01:00
Prevent the admin to cause an error when an ajax action is in progress and the user navigates to another page
This commit is contained in:
@@ -102,7 +102,7 @@ $(function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
root.GravAjax.toastErrorHandler = function (xhr, status, error) {
|
root.GravAjax.toastErrorHandler = function (xhr, status, error) {
|
||||||
if (status !== 'abort') {
|
if (status !== 'abort' && !(status == 'error' && error == '')) {
|
||||||
toastr.error(error);
|
toastr.error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user