Bug 31343: (bug 31138 follow-up) Don't hide error

Some errors are not passing settings and so the error is hidden

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-08-12 15:17:45 +02:00 committed by Tomas Cohen Arazi
parent 5ea78fe9f3
commit e722a53869
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 1 additions and 1 deletions

View File

@ -485,7 +485,7 @@ function filterDataTable( table, column, term ){
}
jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
if ( settings.jqXHR ) {
if ( settings && settings.jqXHR ) {
console.log("Got %s (%s)".format(settings.jqXHR.status, settings.jqXHR.statusText));
alert(__("Something went wrong when loading the table.\n%s: %s").format(settings.jqXHR.status, settings.jqXHR.statusText));
} else {