Improve status.card normalization (it will never be a string)
This commit is contained in:
parent
c4dd3c65f9
commit
c077a4ea58
2 changed files with 3 additions and 4 deletions
|
@ -465,9 +465,8 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
|
|||
);
|
||||
} 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<IStatus, IStatusState> {
|
|||
ref={this.setRef}
|
||||
className='status-card__image status-card-video'
|
||||
style={height ? { height } : undefined}
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
dangerouslySetInnerHTML={{ __html: status.card.html }}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -25,7 +25,7 @@ export const StatusRecord = ImmutableRecord({
|
|||
account: null as EmbeddedEntity<Account>,
|
||||
application: null as ImmutableMap<string, any> | null,
|
||||
bookmarked: false,
|
||||
card: null as EmbeddedEntity<Card>,
|
||||
card: null as Card | null,
|
||||
content: '',
|
||||
created_at: new Date(),
|
||||
emojis: ImmutableList<Emoji>(),
|
||||
|
|
Loading…
Reference in a new issue