Skip to content

Commit

Permalink
fix(posterImage): at least one image
Browse files Browse the repository at this point in the history
an empty array should result in no poster image available.
  • Loading branch information
mxdvl committed Jul 5, 2023
1 parent 2db824d commit 52cce40
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const YoutubeBlockComponent = ({
format,
hideCaption,
overrideImage,
posterImage,
posterImage = [],
expired,
role,
isMainMedia,
Expand Down Expand Up @@ -202,7 +202,7 @@ export const YoutubeBlockComponent = ({
: undefined
}
posterImage={
posterImage
posterImage.length > 0
? [
{
srcSet: posterImage.map((img) => ({
Expand Down

0 comments on commit 52cce40

Please sign in to comment.