fixed error due to issue with server sided preview generation (#70)

This commit is contained in:
sascha10000
2022-06-07 13:15:18 +01:00
committed by GitHub
parent fa7010da0b
commit 2fb902ee01
+9 -1
View File
@@ -23,7 +23,15 @@ export function PreviewUri(props: PreviewUriProps) {
<div>
{previewFetcher.type === "done" ? (
<>
{"error" in previewFetcher.data ? (
{typeof previewFetcher.data == "string" ? (
<PreviewBox>
<Body>
<span
dangerouslySetInnerHTML={{ __html: previewFetcher.data }}
></span>
</Body>
</PreviewBox>
) : "error" in previewFetcher.data ? (
<PreviewBox>
<Body>{previewFetcher.data.error}</Body>
</PreviewBox>