From c8c5d29111849b6de7d8655986c9b082201109ab Mon Sep 17 00:00:00 2001 From: "posthog[bot]" <206114724+posthog[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 06:04:59 +0000 Subject: [PATCH] fix: guard empty featured post on /community to prevent crash When the filtered posts request returns no matches, posts?.[0] is undefined and FeaturedPost's destructure of attributes threw a TypeError. Guard the empty case and give FeaturedPost a safe default. Generated-By: PostHog Code Task-Id: 4db9b46b-37e4-4c36-b614-dc8564cdae2c --- src/components/InsidePostHog/Posts.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/InsidePostHog/Posts.tsx b/src/components/InsidePostHog/Posts.tsx index a0dab01f4e57..728f7eb14596 100644 --- a/src/components/InsidePostHog/Posts.tsx +++ b/src/components/InsidePostHog/Posts.tsx @@ -12,7 +12,7 @@ const FeaturedPostSkeleton = () => { return
} -const FeaturedPost = ({ attributes: { featuredImage, title, excerpt, post_category, slug } }) => { +const FeaturedPost = ({ attributes: { featuredImage, title, excerpt, post_category, slug } = {} }) => { return (