From 824d80b6f83b30fc6b2bec5e0b1a8b62b9f379ae Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 17 Oct 2024 11:11:26 +0200 Subject: [PATCH] Bug 38190: Remove JS error on suggestion page This code could appear several time as we include it in modals Test plan: Go on http://localhost:8081/cgi-bin/koha/suggestion/suggestion.pl Open the console Notice that without this patch you see a JS error Uncaught SyntaxError: redeclaration of const av_bsort1 With this patch applied the error is gone. Signed-off-by: David Nind Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index d1aeee7d7c..d0ebd990c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -260,7 +260,7 @@ }, {}); - const av_bsort1= [% To.json(av_bsort1) | $raw %].map( e => { + var av_bsort1= [% To.json(av_bsort1) | $raw %].map( e => { e['_id'] = e.authorised_value; e['_str'] = e.lib; return e; @@ -269,7 +269,7 @@ map[e._id] = e; return map; }, {}); - const av_bsort2= [% To.json(av_bsort2) | $raw %].map( e => { + var av_bsort2= [% To.json(av_bsort2) | $raw %].map( e => { e['_id'] = e.authorised_value; e['_str'] = e.lib; return e; -- 2.39.5