From 5f7bfa3b1d65cbc3622039af177d50a0a1491543 Mon Sep 17 00:00:00 2001 From: Petro Vashchuk Date: Thu, 11 Jul 2024 17:30:08 +0300 Subject: [PATCH] Bug 37327: JS crash on patrons list when there is patron with empty name To reproduce: 1. Create a new or edit existing patron and set the "First Name" as empty and "Surname" as whitespace (' '), so both name and surname are empty. 2. Go to the patron search page and do the search to load the patron list, which will lead to JS crash and patron list not loading. 3. Apply the patch. 4. Do step 2 again, this time the patron list should load properly. --- koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc index ae27dd09ba..b6fdd3264e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc @@ -37,7 +37,7 @@ } if ( name.replace(' ', '').length == 0 ) { - return _("A patron from library %s".format(patron.library.name)); + return _("A patron from library %s".format(patron.library_id)); } if ( config && config.hide_patron_name ) { -- 2.44.0