Handle null image
All checks were successful
Build and Deploy to Web Server / deploy (push) Successful in 14m56s

This commit is contained in:
2025-08-14 17:57:16 +09:30
parent 778490bed8
commit ee5da382c9

View File

@@ -4,7 +4,7 @@ const { src, alt } = Astro.props;
import { getImageByPath } from "@lib/utils";
const imageSRC = getImageByPath(src)!;
const image = getImageByPath(src);
---
<Image src={imageSRC} alt={alt} />
{image && <Image src={image} alt={alt} />}