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 <magnus@libriotech.no>
Makes the Cypress tests pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2025-01-20 10:17:43 +01:00 committed by Katrin Fischer
parent 60332e7552
commit 16f528e4b4
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 1 additions and 0 deletions

View File

@ -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