Don't try to check a substring of rec.online_loc()[0] if there
are no entries returned by rec.online_loc() to begin with.
Manifests result_info_2 (with the prev/next links) not being
visible on the bottom of the search results page when there
are any bibs present in the results which have no online_loc()
entries.
Signed-off-by: Jeff Godin <jgodin@tadl.org>
runEvt('result', 'recordReceived', rec, r.userdata, false);
// Don't display copy counts if we're an online-only bib
// FIXME: more robust logic, centralize and remove hardcoded string
- if (rec.online_loc()[0].substring(0,20) != "http://via.tadl.org/") {
+ if (!rec.online_loc()[0] || rec.online_loc()[0].substring(0,20) != "http://via.tadl.org/") {
resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS);
}
if(resultPageIsDone() && !recsReceivedCalled) {