Skip to content

Commit 3ff273e

Browse files
authored
Merge pull request #262 from processing/contrib-fix
Fix for contributions library
2 parents 9d2016b + 1046c87 commit 3ff273e

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

src/pages/libraries.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,26 @@ const ContributionsList = memo(({ categories, libraries }) => {
111111
<a href={node.url} target="_blank" rel="noreferrer">
112112
<h3>{node.name}</h3>
113113
</a>
114-
{node.authors.map((author, key) => (
115-
<a
116-
key={key + 'a'}
117-
href={author.slice(
118-
author.indexOf('(') + 1,
119-
author.indexOf(')')
120-
)}
121-
target="_blank"
122-
rel="noreferrer"
123-
className={css.contributionAuthor}>
124-
{author.slice(
125-
author.indexOf('[') + 1,
126-
author.indexOf(']')
127-
)}
128-
</a>
129-
))}
114+
{node.authors.map((author, key) => {
115+
return author.indexOf('(') !== -1 ? (
116+
<a
117+
key={key + 'a'}
118+
href={author.slice(
119+
author.indexOf('(') + 1,
120+
author.indexOf(')')
121+
)}
122+
target="_blank"
123+
rel="noreferrer"
124+
className={css.contributionAuthor}>
125+
{author.slice(
126+
author.indexOf('[') + 1,
127+
author.indexOf(']')
128+
)}
129+
</a>
130+
) : (
131+
<span key={key + 'span'}>{author}</span>
132+
);
133+
})}
130134
</div>
131135
<p
132136
className={classnames(grid.col, css.itemDescription)}

0 commit comments

Comments
 (0)