Check if listing.relatedVideos is Array

This commit is contained in:
Sam Carlton 2022-04-27 14:33:59 -05:00
parent 0ebb746ad9
commit e054b29d64

View file

@ -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 && (