diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index c560bd729b..5b7de46084 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -841,6 +841,8 @@ function _dt_on_visibility(add_filters, table_node, table_dt){ function _dt_add_filters(table_node, table_dt, filters_options = {}) { + if (!table_node.length) return; + $(table_node).find('thead tr:eq(1)').remove(); // Remove if one exists already $(table_node).find('thead tr').clone().appendTo( $(table_node).find('thead') );