From ee5da382c9bf1108bf11de4b197f52827dadabfb Mon Sep 17 00:00:00 2001 From: Nathan Cummins Date: Thu, 14 Aug 2025 17:57:16 +0930 Subject: [PATCH] Handle null image --- src/components/MDX/IMG.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MDX/IMG.astro b/src/components/MDX/IMG.astro index 30d5436..eec55b9 100644 --- a/src/components/MDX/IMG.astro +++ b/src/components/MDX/IMG.astro @@ -4,7 +4,7 @@ const { src, alt } = Astro.props; import { getImageByPath } from "@lib/utils"; -const imageSRC = getImageByPath(src)!; +const image = getImageByPath(src); --- -{alt} +{image && {alt}}