Skip to content

Commit

Permalink
fix(openalex): Some institutions from OpenAlex might have a null coun…
Browse files Browse the repository at this point in the history
…try_code
  • Loading branch information
annelhote committed Jan 17, 2025
1 parent 913134c commit c022a67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function RorName({ isRemoved, ror }) {
ror.rorName
)}
</span>
{getFlagEmoji(ror.rorCountry)}
{getFlagEmoji(ror?.rorCountry)}
{isRemoved && (
<Badge
className="fr-ml-1w"
Expand All @@ -44,7 +44,7 @@ RorName.defaultProps = {
RorName.propTypes = {
isRemoved: PropTypes.bool,
ror: PropTypes.shape({
rorCountry: PropTypes.string.isRequired,
rorCountry: PropTypes.string,
rorName: PropTypes.string.isRequired,
}).isRequired,
};
6 changes: 5 additions & 1 deletion client/src/utils/ror.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@ const getRorData = async (affiliation, getChildren = false) => {
return topLevel.concat(childrenRes.flat());
};

export { cleanRor, getRorData, isRor };
export {
cleanRor,
getRorData,
isRor,
};

0 comments on commit c022a67

Please sign in to comment.