From b229d8ea0328615611ebea57f453e3d8a8a3c59a Mon Sep 17 00:00:00 2001 From: brianuribe6 Date: Wed, 17 Jan 2024 05:28:41 -0500 Subject: [PATCH] Fix alt text not present in image --- apps/front-end/src/plugins/ImagePlugin/Image.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/front-end/src/plugins/ImagePlugin/Image.tsx b/apps/front-end/src/plugins/ImagePlugin/Image.tsx index 01655fa..d3dd18a 100644 --- a/apps/front-end/src/plugins/ImagePlugin/Image.tsx +++ b/apps/front-end/src/plugins/ImagePlugin/Image.tsx @@ -12,7 +12,7 @@ type ImageProps = ComponentPropsWithoutRef<"img"> & { }; function Image(props: ImageProps) { - const { node, alt, ...rest } = props; + const { node, alt = "", ...rest } = props; const [hasFocus, setFocus] = useState(false); const [editor] = useLexicalComposerContext(); const [isSelected, _setSelected, _celearSelection] = useLexicalNodeSelection( @@ -41,10 +41,11 @@ function Image(props: ImageProps) { }; return ( - +