Handling when caption_path is empty.

This commit is contained in:
Roland 2022-11-30 18:29:17 -07:00
parent 427ba5e9b6
commit d3bb94e339
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -73,7 +73,7 @@ function VideoPage({videoFile, prevFile, nextFile, setFavorite, ...props}) {
let posterUrl = video.poster_path ? `${MEDIA_PATH}/${encodeURIComponent(video.poster_path)}` : null;
let captionsUrl = video.caption_path ? `${MEDIA_PATH}/${encodeURIComponent(video.caption_path)}` : null;
let vttCaptions = video.caption_path.endsWith('.vtt');
let vttCaptions = video.caption_path && video.caption_path.endsWith('.vtt');
let description = 'No description available.';
let viewCount = video.view_count;