Skip to content

Commit

Permalink
CORE: remove undefined from url
Browse files Browse the repository at this point in the history
  • Loading branch information
ekachxaidze98 committed Nov 27, 2024
1 parent be742c9 commit 0a1e4a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/search/results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ const Results = ({ works, searchId }) =>
memberType?.billing_type === 'supporting' ||
memberType?.billing_type === 'sustaining'

const generateMetadataLink = (baseLink, propSearchId, propId) =>
`${baseLink}/?t=${propSearchId}-${propId}`
const generateMetadataLink = (baseLink, propSearchId, propId) => {
if (!propSearchId) return baseLink
return `${baseLink}/?t=${propSearchId}-${propId}`
}

const modifiedReaderLink = readerLink
?.replace(/(https:\/\/)(core\.ac\.uk)/, '$1api.$2')
Expand Down

0 comments on commit 0a1e4a4

Please sign in to comment.