From e054b29d644f55fb7d47f151f612e25f441ab9cb Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Wed, 27 Apr 2022 14:33:59 -0500 Subject: [PATCH] Check if listing.relatedVideos is Array --- src/components/listing-parts/related-videos.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/listing-parts/related-videos.astro b/src/components/listing-parts/related-videos.astro index dd83478..6fbc9e2 100644 --- a/src/components/listing-parts/related-videos.astro +++ b/src/components/listing-parts/related-videos.astro @@ -6,7 +6,7 @@ const { listing } = Astro.props -const hasRelatedVideos = listing.relatedVideos.length > 0 +const hasRelatedVideos = Array.isArray( listing.relatedVideos ) && listing.relatedVideos.length > 0 --- { hasRelatedVideos && (