diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index 2c5a2097d..473d12eb3 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -465,9 +465,8 @@ class Status extends ImmutablePureComponent { ); } else if (size === 1 && firstAttachment.type === 'video') { const video = firstAttachment; - const html = String(status.getIn(['card', 'html'])); - if (video.external_video_id && html) { + if (video.external_video_id && status.card) { const { mediaWrapperWidth } = this.state; const getHeight = (): number => { @@ -484,7 +483,7 @@ class Status extends ImmutablePureComponent { ref={this.setRef} className='status-card__image status-card-video' style={height ? { height } : undefined} - dangerouslySetInnerHTML={{ __html: html }} + dangerouslySetInnerHTML={{ __html: status.card.html }} /> ); diff --git a/app/soapbox/normalizers/status.ts b/app/soapbox/normalizers/status.ts index 4d1260ffe..6496111fd 100644 --- a/app/soapbox/normalizers/status.ts +++ b/app/soapbox/normalizers/status.ts @@ -25,7 +25,7 @@ export const StatusRecord = ImmutableRecord({ account: null as EmbeddedEntity, application: null as ImmutableMap | null, bookmarked: false, - card: null as EmbeddedEntity, + card: null as Card | null, content: '', created_at: new Date(), emojis: ImmutableList(),