From 0af2b23578a2d80f18d057e1d4ed54067ea53bf3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 5 Mar 2021 08:31:23 +0000 Subject: [PATCH] Bug 26273: (QA follow-up) Check for null firstname This patch adds a test for firstname being defined before constructing fullname from it. Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt index e99c17a1ba..f392fa2da9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -437,7 +437,13 @@ "searchable": true, "orderable": true, "render": function(data, type, row, meta) { - var fullname = row.manager.firstname + " " + row.manager.surname; + var fullname; + if ( row.manager.firstname == null ) { + fullname = row.manager.surname; + } + else { + fullname = row.manager.firstname + " " + row.manager.surname; + } return fullname; } }, -- 2.11.0