From d1f9311931b48f36bd538b5bc74decd8967bf0a2 Mon Sep 17 00:00:00 2001
From: Jay V <air@live.ca>
Date: Tue, 17 Jun 2025 20:26:09 -0400
Subject: ignore: share page polish

---
 packages/web/src/components/CodeBlock.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'packages/web/src/components/CodeBlock.tsx')

diff --git a/packages/web/src/components/CodeBlock.tsx b/packages/web/src/components/CodeBlock.tsx
index a9bfae8be..03744550e 100644
--- a/packages/web/src/components/CodeBlock.tsx
+++ b/packages/web/src/components/CodeBlock.tsx
@@ -18,9 +18,9 @@ function CodeBlock(props: CodeBlockProps) {
   const [local, rest] = splitProps(props, ["code", "lang", "onRendered"])
   let containerRef!: HTMLDivElement
 
-  const [html] = createResource(async () => {
-    return (await codeToHtml(local.code, {
-      lang: local.lang || "text",
+  const [html] = createResource(() => [local.code, local.lang], async ([code, lang]) => {
+    return (await codeToHtml(code || "", {
+      lang: lang || "text",
       themes: {
         light: "github-light",
         dark: "github-dark",
-- 
cgit v1.2.3

