diff --git a/app/javascript/packs/homePageFeed.jsx b/app/javascript/packs/homePageFeed.jsx index 798bfc8a5..20464e2cb 100644 --- a/app/javascript/packs/homePageFeed.jsx +++ b/app/javascript/packs/homePageFeed.jsx @@ -82,21 +82,23 @@ export const renderFeed = (timeFrame) => { const [featuredStory, ...subStories] = feedItems; const feedStyle = JSON.parse(document.body.dataset.user).feed_style; - - sendFeaturedArticleAnalytics(featuredStory.id); + if(featuredStory) { + sendFeaturedArticleAnalytics(featuredStory.id); + } // 1. Show the featured story first // 2. Podcast episodes out today // 3. Rest of the stories for the feed return (
+ {featuredStory &&
+ />} {podcastEpisodes.length > 0 && ( )}