Skip to content

Commit 981b21b

Browse files
authored
Merge pull request #14750 from guardian/SiAdcock-patch-1
Don't throw when main media is not image
2 parents cc6456c + 41a3a66 commit 981b21b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dotcom-rendering/src/types/article.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export const getGalleryMainMedia = (
7575
mainMedia._type !==
7676
'model.dotcomrendering.pageElements.ImageBlockElement'
7777
) {
78-
throw new Error('Main media is not an image');
78+
logger.warn('Main media is not an image');
79+
return;
7980
}
8081

8182
return mainMedia;

0 commit comments

Comments
 (0)