diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/linkContribution.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/content/dependencies/linkContribution.js b/src/content/dependencies/linkContribution.js index 210d5b01..c9b514fe 100644 --- a/src/content/dependencies/linkContribution.js +++ b/src/content/dependencies/linkContribution.js @@ -16,9 +16,12 @@ export default { relations.artistLink = relation('linkArtist', artist); - relations.artistIcons = - (artist.urls ?? []).map(url => - relation('linkExternalAsIcon', url)); + if (!empty(artist.urls)) { + relations.artistIcons = + artist.urls + .slice(0, 4) + .map(url => relation('linkExternalAsIcon', url)); + } return relations; }, @@ -34,7 +37,7 @@ export default { generate(data, relations, slots, {html, language}) { const hasContributionPart = !!(slots.showContribution && data.contribution); - const hasExternalPart = !!(slots.showIcons && !empty(relations.artistIcons)); + const hasExternalPart = !!(slots.showIcons && relations.artistIcons); const externalLinks = hasExternalPart && html.tag('span', |