diff --git a/components/RecipeCard.tsx b/components/RecipeCard.tsx index 8a366de..e33d5ca 100644 --- a/components/RecipeCard.tsx +++ b/components/RecipeCard.tsx @@ -8,9 +8,9 @@ interface RecipeCardProps { export default function RecipeCard({ recipe }: RecipeCardProps) { // Convert relative path to public URL - const imageSrc = recipe.displayPhoto.startsWith('./') + const imageSrc = recipe.displayPhoto && recipe.displayPhoto.startsWith('./') ? `/recipes/${recipe.folderPath}/${recipe.displayPhoto.replace('./', '')}`.replace(/\\/g, '/') - : recipe.displayPhoto; + : recipe.displayPhoto || null; return (