From ff5cbfa7a12fe1d8971ec7c2d1be312a7310b4fe Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 16 Dec 2024 12:30:29 -0600 Subject: Use January as default month Sometimes, the publication date only contains the year. --- uploader/templates/phenotypes/add-phenotypes-base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uploader/templates') diff --git a/uploader/templates/phenotypes/add-phenotypes-base.html b/uploader/templates/phenotypes/add-phenotypes-base.html index c0dd35d..79d1f05 100644 --- a/uploader/templates/phenotypes/add-phenotypes-base.html +++ b/uploader/templates/phenotypes/add-phenotypes-base.html @@ -223,7 +223,7 @@ "journal": details[pubmed_id].fulljournalname, "volume": details[pubmed_id].volume, "pages": details[pubmed_id].pages, - "month": months[_date[1].toLowerCase()], + "month": _date.length > 1 ? months[_date[1].toLowerCase()] : "jan", "year": _date[0], }; }; -- cgit v1.2.3