X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=js%2Fpz2.js;h=52d6ba9deb3fc209786353d2a15833b521c104a5;hb=00eef4755b27b2c8637f10a829999cd095dba90a;hp=84fd6965de42d0db6adfc0179434d0768e580618;hpb=2fdbd5de9185e926401609c22b328f07af0248bd;p=pazpar2-moved-to-github.git diff --git a/js/pz2.js b/js/pz2.js index 84fd696..52d6ba9 100644 --- a/js/pz2.js +++ b/js/pz2.js @@ -1,5 +1,5 @@ /* -** $Id: pz2.js,v 1.31 2007-06-04 12:31:07 jakub Exp $ +** $Id: pz2.js,v 1.32 2007-06-04 12:49:21 jakub Exp $ ** pz2.js - pazpar2's javascript client library. */ @@ -314,7 +314,9 @@ pz2.prototype = { } else { var nodeName = hits[i].childNodes[j].nodeName; - var nodeText = hits[i].childNodes[j].firstChild.nodeValue; + var nodeText = 'ERROR' + if ( hits[i].childNodes[j].firstChild ) + nodeText = hits[i].childNodes[j].firstChild.nodeValue; show.hits[i][nodeName] = nodeText; } }