Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with adding valid DOIs to ref manager #1764

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kerkelae
Copy link

This PR aims to solve ResearchHub/issues#34.

The issue seems to have been issn.join failing if issn is null or not an array. The fix involves adding a check to ensure issn is an array before calling the join method. The updated code uses Array.isArray(issn) ? issn.join(", ") : "", which checks if issn is an array; if it is, it joins the array elements into a string separated by commas. If issn is not an array or is null, it defaults to an empty string. This prevents the application from throwing an error when trying to call join on a null value.

I ran the code locally and was able to add the DOI that caused the issue:

image

@kerkelae kerkelae requested a review from a team as a code owner June 28, 2024 14:04
Copy link

vercel bot commented Jun 28, 2024

@kerkelae is attempting to deploy a commit to the ResearchHub Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant