mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: Skip rendering twitter video if matching format not found
Followup to d5a4318a
This commit is contained in:
@ -29,7 +29,7 @@ class TwitterApi
|
||||
.select { |v| v['content_type'] == 'video/mp4' }
|
||||
.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']
|
||||
height = m['sizes']['large']['h']
|
||||
|
||||
|
Reference in New Issue
Block a user