From 3f4cfb975726ae3ef2d8b4e7bf7ffa630c83cd8a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 25 Sep 2025 12:17:03 +0200 Subject: [PATCH] Revert "Bug 40565: (follow-up) Make sure there is a table_node" This reverts commit addd5e3a0d32e227834c02c2b16ac735decb80fa. --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index b03b44a9784..4b6d178bcb5 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -1037,14 +1037,12 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) { }) .each(function () { let optionValue = this._id; - if (table_dt.settings()[0].ajax !== null) { - let tableId = - table_node && table_node.id - ? table_node.id - : null; - if (tableId && tableId !== "item_search") { - optionValue = `^${this._id}$`; - } + + if ( + table_dt.settings()[0].ajax !== null && + table_node.attr("id") !== "item_search" + ) { + optionValue = `^${this._id}$`; } let o = $( -- 2.34.1