From 6f76a72abf717b3e1fa3ea4027169734b1ebbad7 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 2 Dec 2016 08:59:21 -0800 Subject: [PATCH] handle single ISSN --- lib/Reference/Retrieve/PubMed.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Reference/Retrieve/PubMed.pm b/lib/Reference/Retrieve/PubMed.pm index 0ecc842..d1de4e9 100644 --- a/lib/Reference/Retrieve/PubMed.pm +++ b/lib/Reference/Retrieve/PubMed.pm @@ -362,6 +362,9 @@ sub _fix_medline_journal($$$;){ $journal{lc($2)} = $3; } } + if (ref $ref->{JrXml}{Serial}{ISSN} ne 'ARRAY') { + $ref->{JrXml}{Serial}{ISSN} = [$ref->{JrXml}{Serial}{ISSN}]; + } my $print_issn = $ref->{JrXml}{Serial}{ISSN}[0]{IssnType} eq 'Print' ? 0 : 1; my @journal_entry = (title => $ref->{JrXml}{Serial}{Title}, -- 2.39.5