Skip to content

Commit

Permalink
fix(ui): gracefully handle image paths in markdown (langfuse#2717)
Browse files Browse the repository at this point in the history
  • Loading branch information
marliessophie authored Jul 23, 2024
1 parent 31fb4b4 commit 69bf783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/components/ui/MarkdownViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ const MarkdownImage: Components["img"] = ({ src, alt }) => {
);
}

const isHttp = new URL(src).protocol === "http:";
const errorDescription = `Cannot load image. ${isHttp ? "Http images are not rendered in Langfuse for security reasons." : ""} Click to view image in new tab`;
const errorDescription =
"Cannot load image. Http images are not rendered in Langfuse for security reasons";

if (isValidImage.data?.isValid) {
return (
Expand Down

0 comments on commit 69bf783

Please sign in to comment.