Bug 29575: (QA follow-up) Patron fields can be empty strings
We need to account for empty strings as well as 'null' values in the patron data structure. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
0d35f38466
commit
29e3d3d7fe
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
|
||||
var title = null;
|
||||
if ( patron.title != null ) {
|
||||
if ( patron.title != null && patron.title != '' ) {
|
||||
title = '<span class="patron-title">' + escape_str(patron.title) + '</span>';
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
var firstname = escape_str(patron.firstname);
|
||||
var surname = escape_str(patron.surname);
|
||||
|
||||
if ( patron.other_name != null ) {
|
||||
if ( patron.other_name != null && patron.other_name != '' ) {
|
||||
firstname += ' (' + escape_str(patron.other_name) + ')';
|
||||
}
|
||||
if ( config && config.invert_name ) {
|
||||
|
|
Loading…
Reference in a new issue