Skip to content

Commit

Permalink
test: what if we made this optional
Browse files Browse the repository at this point in the history
part of an experiment from @JamieB-gu & @alinaboghiu
  • Loading branch information
mxdvl committed Jan 25, 2024
1 parent 663b4ab commit afc3363
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dotcom-rendering/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,10 @@ export const Card = ({
defer={{ until: 'visible' }}
>
<YoutubeBlockComponent
id={media.mainMedia.id}
id={
media.mainMedia.id ??
'something-very-odd-happened-but-let-us-crack-on'
}
assetId={
media.mainMedia.videoId
}
Expand Down
2 changes: 1 addition & 1 deletion dotcom-rendering/src/types/mainMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Media = {
type Video = Media & {
type: 'Video';
/** @see https://github.com/guardian/frontend/blob/8e7e4d0e/common/app/model/content/Atom.scala#L159 */
id: string;
id?: string;
videoId: string;
height: number;
width: number;
Expand Down

0 comments on commit afc3363

Please sign in to comment.