Skip to content

Commit a875927

Browse files
committed
Don't show podcast images if we're hiding card image
1 parent da4a6f7 commit a875927

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dotcom-rendering/src/model/enhanceCards.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ const decideMedia = (
197197
galleryCount: number = 0,
198198
audioDuration: string = '',
199199
podcastImage?: PodcastSeriesImage,
200+
imageHide?: boolean,
200201
): MainMedia | undefined => {
201202
// If the showVideo toggle is enabled in the fronts tool,
202203
// we should return the active mediaAtom regardless of the design
@@ -211,7 +212,7 @@ const decideMedia = (
211212
case ArticleDesign.Audio:
212213
return {
213214
type: 'Audio',
214-
podcastImage,
215+
podcastImage: !imageHide ? podcastImage : undefined,
215216
duration: audioDuration,
216217
};
217218

@@ -293,6 +294,7 @@ export const enhanceCards = (
293294
faciaCard.card.galleryCount,
294295
faciaCard.card.audioDuration,
295296
podcastImage,
297+
faciaCard.display.imageHide,
296298
);
297299

298300
return {

0 commit comments

Comments
 (0)