fix: handle case for missing thumbnail type in course component

This commit is contained in:
swve 2025-06-23 22:49:44 +02:00
parent 63cb3bfd59
commit 19fd5ef05c

View file

@ -157,7 +157,7 @@ const CourseClient = (props: any) => {
<div className="w-full md:w-3/4 space-y-4">
{(() => {
const showVideo = course.thumbnail_type === 'video' || (course.thumbnail_type === 'both' && activeThumbnailType === 'video');
const showImage = course.thumbnail_type === 'image' || (course.thumbnail_type === 'both' && activeThumbnailType === 'image');
const showImage = course.thumbnail_type === 'image' || (course.thumbnail_type === 'both' && activeThumbnailType === 'image') || !course.thumbnail_type;
if (showVideo && course.thumbnail_video) {
return (