Browse Source

fixed error when results were missing pubYear

2.x-ebsco
Paul Pound 7 years ago
parent
commit
b746b1af4d
  1. 7
      targets/eds/js/eds_results.js

7
targets/eds/js/eds_results.js

@ -28,10 +28,9 @@ Drupal.behaviors.roblib_search_eds = {
items.push('<a href="http://proxy.library.upei.ca/login?url='+val.PLink+'&scope=site">'+val2.Data+'</a></div>'); items.push('<a href="http://proxy.library.upei.ca/login?url='+val.PLink+'&scope=site">'+val2.Data+'</a></div>');
}) })
} }
pubYear = val.RecordInfo.BibRelationships.IsPartOfRelationships["date"][0]["Y"]; pubYear = val.RecordInfo.BibRelationships.IsPartOfRelationships["date"];
if(pubYear == 'undefined') { !pubYear ? pubYear = " " : pubYear = pubYear[0]["Y"];
pubYear = "Unknown";
}
if (typeof val.Items.TypPub !== 'undefined') { if (typeof val.Items.TypPub !== 'undefined') {
jQuery.each(val.Items.TypPub, function(key6, typpub){ jQuery.each(val.Items.TypPub, function(key6, typpub){
strs = typpub.Data.split('; '); strs = typpub.Data.split('; ');

Loading…
Cancel
Save