From 91f8a6cac1b4c972c1b9714d3a5eb4c0762db328 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. --- 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..6b282f018a 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.firstname + " " + row.manager.surname; + } + else { + fullname = row.manager.surname; + } return fullname; } }, -- 2.20.1