Skip to content
Snippets Groups Projects
Commit 5855a250 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(podcast-activity): check if transcript and chapters are set before including them in audio

parent 0128a21e
No related branches found
No related tags found
No related merge requests found
......@@ -68,10 +68,16 @@ class PodcastEpisode extends ObjectType
'type' => 'Link',
'mediaType' => $episode->audio->file_mimetype,
],
'transcript' => $episode->transcript->file_url,
'chapters' => $episode->chapters->file_url,
];
if ($episode->transcript !== null) {
$this->audio['transcript'] = $episode->transcript->file_url;
}
if ($episode->chapters !== null) {
$this->audio['chapters'] = $episode->chapters->file_url;
}
$this->comments = url_to('episode-comments', $episode->podcast->handle, $episode->slug);
if ($episode->published_at !== null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment