From cab701d3ea9a76947bdd27481000a4a1bfb4e568 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Fri, 6 Sep 2024 17:23:30 -0700 Subject: [PATCH] fix resolveOpts props error in md image --- frontend/app/element/markdown.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app/element/markdown.tsx b/frontend/app/element/markdown.tsx index 31d507693..fc4b0537e 100644 --- a/frontend/app/element/markdown.tsx +++ b/frontend/app/element/markdown.tsx @@ -89,6 +89,8 @@ const MarkdownImg = (props: any) => { const [resolvedStr, setResolvedStr] = useState(null); const [resolving, setResolving] = useState(true); const resolveOpts: MarkdownResolveOpts = props.resolveOpts; + const propsScrubbed = { ...props }; + delete propsScrubbed.resolveOpts; useEffect(() => { if (props.src.startsWith("http://") || props.src.startsWith("https://")) { @@ -132,7 +134,7 @@ const MarkdownImg = (props: any) => { return {resolvedStr}; } if (resolvedSrc != null) { - return ; + return ; } return [img]; };