Commit a343de4c authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(chapters): use episode cover when chapter img is an empty string

fixes #444
parent dfd66bee
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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'] : '',
            ]);
        } ?>