From bdcd82bb9b9bda2c8f8c94c2cf415299398fdc6c 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 b637cf1065f..95c460aa2e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -1239,6 +1239,9 @@ function _dt_save_restore_state(table_settings, 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.34.1