Skip to content

Commit

Permalink
Filter only non empty numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
ejimsan committed Dec 13, 2023
1 parent 68ba4fe commit 9012ae1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/fragmentarium/ui/info/ExternalResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ export default function ExternalResources({

return (
<ul className="ExternalResources__items">
{externalNumbers.map(([number, LinkComponent], index) => (
<li key={index}>
<ExternalLink number={number} LinkComponent={LinkComponent} />
</li>
))}
{externalNumbers
.filter(([number]) => !_.isEmpty(number))
.map(([number, LinkComponent], index) => (
<li key={index}>
<ExternalLink number={number} LinkComponent={LinkComponent} />
</li>
))}
{!_.isEmpty(fragment.oraccNumbers) && (
<li>
<OraccLinks
Expand Down

0 comments on commit 9012ae1

Please sign in to comment.