diff --git a/client/components/panels/news-feed.jsx b/client/components/panels/news-feed.jsx index 7bde952..a3ee588 100644 --- a/client/components/panels/news-feed.jsx +++ b/client/components/panels/news-feed.jsx @@ -26,7 +26,21 @@ const NewsFeed = props => { return (

News Feed

- {articles.map((article, index) => { + {(articles || []).map((article, index) => { + //BUGFIX: check for empty data + if (!article.title) { + return article.title = ''; + } + + if (!article.author) { + return article.author = ''; + } + + if (!article.body) { + return article.body = ''; + } + + //render return (