Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update markdown.tsx

Tim Wilson87100eea8884
diff --git a/apps/web/ui/guides/markdown.tsx b/apps/web/ui/guides/markdown.tsx
index f6582b9016..66812ef7f6 100644
--- a/apps/web/ui/guides/markdown.tsx
+++ b/apps/web/ui/guides/markdown.tsx
@@ -74,7 +74,7 @@ function CodeBlock({ node, children, ...rest }: any) {
const [highlighted, setHighlighted] = useState("");
useEffect(() => {
- codeToHtml(code.trimEnd(), {
+ codeToHtml(code?.trimEnd() || "", {
lang: lang || "plaintext",
theme: "min-light",
}).then((html) => setHighlighted(html));