From 7356a6b5a4254f1ff20a73cbdec37c6cc0826729 Mon Sep 17 00:00:00 2001 From: Matthew Conlen Date: Wed, 25 Mar 2020 14:01:47 -0700 Subject: [PATCH] Update hover citations when there no authors cc @fredhohman --- src/helpers/citation.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/helpers/citation.js b/src/helpers/citation.js index 3afff8c..e6c417f 100644 --- a/src/helpers/citation.js +++ b/src/helpers/citation.js @@ -193,8 +193,17 @@ export function hover_cite(ent) { cite += "
"; var a_str = author_string(ent, "${I} ${L}", ", ") + "."; + if (a_str.trim() === '.') { + a_str = ''; + } + var v_str = venue_string(ent).trim() + " " + ent.year + ". " + doi_string(ent, true); + + if (!a_str.length) { + cite += v_str; + return cite; + } if ((a_str + v_str).length < Math.min(40, ent.title.length)) { cite += a_str + " " + v_str;