FIX: Skip rendering twitter video if matching format not found

Followup to d5a4318a
This commit is contained in:
David Taylor 2020-08-17 20:53:14 +01:00
parent 441ac21053
commit a895e4a15b
No known key found for this signature in database
GPG Key ID: 46904C18B1D3F434
1 changed files with 1 additions and 1 deletions

View File

@ -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']