external_video_id hotfix

This commit is contained in:
Alex Gleason 2022-03-30 14:01:05 -05:00
parent 531f6f3993
commit 99b89d2230
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 2 additions and 2 deletions

View File

@ -439,7 +439,7 @@ class Status extends ImmutablePureComponent {
} else if (size === 1 && status.getIn(['media_attachments', 0, 'type']) === 'video') {
const video = status.getIn(['media_attachments', 0]);
if (video.external_video_id) {
if (video.external_video_id && status.card?.html) {
const { mediaWrapperWidth } = this.state;
const height = mediaWrapperWidth / (video.getIn(['meta', 'original', 'width']) / video.getIn(['meta', 'original', 'height']));
media = (

View File

@ -110,7 +110,7 @@ class DetailedStatus extends ImmutablePureComponent {
if (size > 0) {
if (size === 1 && status.getIn(['media_attachments', 0, 'type']) === 'video') {
const video = status.getIn(['media_attachments', 0]);
if (video.external_video_id) {
if (video.external_video_id && status.card?.html) {
const { mediaWrapperWidth } = this.state;
const height = mediaWrapperWidth / (video.getIn(['meta', 'original', 'width']) / video.getIn(['meta', 'original', 'height']));
media = (