Skip to content

Commit 8dff4cd

Browse files
committed
Don't render "Contributors" header if there aren't any
1 parent a5b6eae commit 8dff4cd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

components/contributors/contributors.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ import React from 'react';
22
import './contributors-style';
33

44
export default ({contributors}) => {
5+
if (!contributors.length) {
6+
return <noscript />;
7+
}
8+
59
return (
610
<div className="contributors">
711
<h3>Contributors:</h3>
812
<div className="contributors__list">
9-
{
10-
(contributors || []).map((contributor) => (
11-
<a key={ contributor }
13+
{
14+
(contributors).map((contributor) => (
15+
<a key={ contributor }
1216
className="contributor"
1317
href={ `https://github.com/${contributor}` }>
1418
<img src={ `https://github.com/${contributor}.png?size=50` } />

0 commit comments

Comments
 (0)