From fa34777f707aaa1be9a35c76216e24d5d4a4fb2a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 20 Jan 2025 10:17:43 +0100 Subject: [PATCH] Bug 36025: Fix failure when pref is off Content-Type: text/plain; charset=utf-8 Prevent JS error if ExtendedPatronAttributes is off "Uncaught TypeError: options.extended_attribute_types is undefined" Signed-off-by: Magnus Enger Makes the Cypress tests pass. Signed-off-by: Marcel de Rooy --- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index b219551f6f..c4fbfcd658 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -909,6 +909,7 @@ function buildPatronSearchQuery(term, options) { if ( typeof options !== "undefined" && ((options.search_fields == "standard" && + options.extended_attribute_types && options.extended_attribute_types.length > 0) || searched_attribute_fields.length > 0) && extendedPatronAttributes -- 2.39.5