From 7720ea74a2152a47e62eca779cde83e2a44f7bb6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 12 Aug 2022 15:17:45 +0200 Subject: [PATCH] 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 --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index 21dfe52636..53e2079d93 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -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 { -- 2.20.1