From 9204f7d34cc79cb1c3835b3df157ba63cecfc6a3 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 20 Nov 2018 18:03:52 +0100 Subject: [PATCH] make it work --- src/components/Repositories/Repository.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Repositories/Repository.jsx b/src/components/Repositories/Repository.jsx index ebabc8e3..0305cbed 100644 --- a/src/components/Repositories/Repository.jsx +++ b/src/components/Repositories/Repository.jsx @@ -114,11 +114,13 @@ class Numbers extends PureComponent { } }) - const repo = response.data.map(item => { - if (item.name === this.props.name) { - return item - } - }) + const repo = response.data + .map(item => { + if (item.name === this.props.name) { + return item + } + }) + .filter(n => n) const { forks, stars } = repo