diff --git a/targets/eds/js/eds_results.js b/targets/eds/js/eds_results.js index 4787c9b..b290306 100644 --- a/targets/eds/js/eds_results.js +++ b/targets/eds/js/eds_results.js @@ -28,10 +28,9 @@ Drupal.behaviors.roblib_search_eds = { items.push(''+val2.Data+''); }) } - pubYear = val.RecordInfo.BibRelationships.IsPartOfRelationships["date"][0]["Y"]; - if(pubYear == 'undefined') { - pubYear = "Unknown"; - } + pubYear = val.RecordInfo.BibRelationships.IsPartOfRelationships["date"]; + !pubYear ? pubYear = " " : pubYear = pubYear[0]["Y"]; + if (typeof val.Items.TypPub !== 'undefined') { jQuery.each(val.Items.TypPub, function(key6, typpub){ strs = typpub.Data.split('; ');