mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
FIX: Skip rendering twitter video if matching format not found
Followup to d5a4318a
This commit is contained in:
parent
441ac21053
commit
a895e4a15b
@ -29,7 +29,7 @@ class TwitterApi
|
|||||||
.select { |v| v['content_type'] == 'video/mp4' }
|
.select { |v| v['content_type'] == 'video/mp4' }
|
||||||
.sort { |v| v['bitrate'] }.last # choose highest bitrate
|
.sort { |v| v['bitrate'] }.last # choose highest bitrate
|
||||||
|
|
||||||
if url = video_to_display['url']
|
if video_to_display && url = video_to_display['url']
|
||||||
width = m['sizes']['large']['w']
|
width = m['sizes']['large']['w']
|
||||||
height = m['sizes']['large']['h']
|
height = m['sizes']['large']['h']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user