From 16f528e4b4092fb59d93645d53e94d3fb19ce6e7 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 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 Signed-off-by: Katrin Fischer --- 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