From 54a14edf9cc04dbe466dc5a48d9af8734a93a7f7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 2 Dec 2024 10:56:34 +0100 Subject: [PATCH] Bug 38255: Early return if the node does not exist Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index 00a7dcbb914..f3828dbb69d 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -1014,6 +1014,9 @@ function _dt_save_restore_state(table_settings, external_filter_nodes={}){ $.fn.kohaTable = function(options, table_settings, add_filters, default_filters, filters_options, external_filter_nodes) { var settings = null; + // Early return if the node does not exist + if (!this.length) return; + if(options) { // Don't redefine the default initComplete if ( options.initComplete ) { -- 2.39.5