From 1895c4fe6eb911986ca0ab6bcf5fb66f2f324c0c Mon Sep 17 00:00:00 2001 From: dbs Date: Sat, 13 Sep 2008 07:27:57 +0000 Subject: [PATCH] Prevent an 'undefined' $z note from being displayed when neither $y and $3 are defined git-svn-id: svn://svn.open-ils.org/ILS/trunk@10588 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/skin/default/js/rdetail.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js index a6d3f00486..015caac233 100644 --- a/Open-ILS/web/opac/skin/default/js/rdetail.js +++ b/Open-ILS/web/opac/skin/default/js/rdetail.js @@ -224,15 +224,15 @@ function _rdetailDraw(r) { // (as $y was defined later in MARC21's life as the display label) var displayLabel = '' + links[i+1]; var note = '' + links[i+2]; - if(!displayLabel || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) { - if(!note || note.match(/https?:\/|ftps?:\/|mailto:/i)) { + if(displayLabel == 'undefined' || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) { + if(note == 'undefined' || note.match(/https?:\/|ftps?:\/|mailto:/i)) { displayLabel = href; } else { displayLabel = note; } } $('rdetail_online').appendChild(elem('a', {href:href,'class':'classic_link'}, displayLabel)); - if (note && note != displayLabel) { + if (note != 'undefined' && note != displayLabel) { $('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note)); } $('rdetail_online').appendChild(elem('br')); -- 2.43.2