From a343de4cf6ba38561b8fe675fa9c38d9f0ecfec7 Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Wed, 21 Feb 2024 14:14:29 +0000 Subject: [PATCH] fix(chapters): use episode cover when chapter img is an empty string fixes #444 --- themes/cp_app/episode/chapters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/cp_app/episode/chapters.php b/themes/cp_app/episode/chapters.php index e94582ad..0ccb0d32 100644 --- a/themes/cp_app/episode/chapters.php +++ b/themes/cp_app/episode/chapters.php @@ -14,7 +14,7 @@ echo view('episode/_partials/chapter', [ 'title' => array_key_exists('title', $chapter) ? $chapter['title'] : '', 'startTime' => format_duration($chapter['startTime']), - 'chapterImgUrl' => array_key_exists('img', $chapter) ? $chapter['img'] : $episode->cover->thumbnail_url, + 'chapterImgUrl' => array_key_exists('img', $chapter) && $chapter['img'] !== '' ? $chapter['img'] : $episode->cover->thumbnail_url, 'chapterUrl' => array_key_exists('url', $chapter) ? $chapter['url'] : '', ]); } ?>