[open-ils-commits] r7779 - trunk/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Sep 13 17:43:21 EDT 2007
Author: erickson
Date: 2007-09-13 17:35:20 -0400 (Thu, 13 Sep 2007)
New Revision: 7779
Modified:
trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
added some sanity checks for empty types-of-resource fields
Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2007-09-13 21:34:52 UTC (rev 7778)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2007-09-13 21:35:20 UTC (rev 7779)
@@ -184,8 +184,11 @@
G.ui.rdetail.pubdate.appendChild(text(record.pubdate()));
G.ui.rdetail.publisher.appendChild(text(record.publisher()));
$('rdetail_physical_desc').appendChild(text(record.physical_description()));
- G.ui.rdetail.tor.appendChild(text(record.types_of_resource()[0]));
- setResourcePic( G.ui.rdetail.tor_pic, record.types_of_resource()[0]);
+ r = record.types_of_resource();
+ if(r) {
+ G.ui.rdetail.tor.appendChild(text(r[0]));
+ setResourcePic( G.ui.rdetail.tor_pic, r[0]);
+ }
G.ui.rdetail.abstr.appendChild(text(record.synopsis()));
More information about the open-ils-commits
mailing list