From de8139e76a1b18a89a15bbba072a8dcd5719b810 Mon Sep 17 00:00:00 2001 From: Leevi Date: Fri, 28 Jun 2024 14:58:53 +0100 Subject: [PATCH 1/2] Deal with null issn --- .../references/reference_uploader/reference_upload_utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ReferenceManager/references/reference_uploader/reference_upload_utils.ts b/components/ReferenceManager/references/reference_uploader/reference_upload_utils.ts index c44bd2cc66..44c38581b0 100644 --- a/components/ReferenceManager/references/reference_uploader/reference_upload_utils.ts +++ b/components/ReferenceManager/references/reference_uploader/reference_upload_utils.ts @@ -73,7 +73,7 @@ export function parseDoiSearchResultOntoValueSet({ date: !isEmpty(issued) ? moment(issued).format("MM-DD-YYYY") : "", DOI: doi, title: formattedTitle, - ISSN: issn.join(", "), + ISSN: Array.isArray(issn) ? issn.join(", ") : "", // ensure issn is an array pdf_url: pdf_url, URL: landing_page_url, signed_pdf_url, @@ -84,7 +84,7 @@ export function parseDoiSearchResultOntoValueSet({ }, required: referenceSchemaValueSet.required, }; - + setReferenceSchemaValueSet(schemaSet); } From 1de4a69516fcaff16c9479bc4f69dbd3ff8c23dc Mon Sep 17 00:00:00 2001 From: Leevi Date: Fri, 28 Jun 2024 15:06:45 +0100 Subject: [PATCH 2/2] Remove empty line --- .../references/reference_uploader/reference_upload_utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ReferenceManager/references/reference_uploader/reference_upload_utils.ts b/components/ReferenceManager/references/reference_uploader/reference_upload_utils.ts index 44c38581b0..11787b8ec4 100644 --- a/components/ReferenceManager/references/reference_uploader/reference_upload_utils.ts +++ b/components/ReferenceManager/references/reference_uploader/reference_upload_utils.ts @@ -84,7 +84,6 @@ export function parseDoiSearchResultOntoValueSet({ }, required: referenceSchemaValueSet.required, }; - setReferenceSchemaValueSet(schemaSet); }