Skip to content

Commit 1182592

Browse files
committed
chore(share): fix another typecheck issue
1 parent 0c399a6 commit 1182592

File tree

1 file changed

+3
-1
lines changed
  • packages/share-theme/src/scripts/modules

1 file changed

+3
-1
lines changed

packages/share-theme/src/scripts/modules/math.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export default async function setupMath() {
99
const renderMathInElement = (await import("katex/contrib/auto-render")).default;
1010
await import("katex/contrib/mhchem");
1111

12-
renderMathInElement(document.getElementById("content"));
12+
const contentEl = document.getElementById("content");
13+
if (!contentEl) return;
14+
renderMathInElement(contentEl);
1315
document.body.classList.add("math-loaded");
1416
}

0 commit comments

Comments
 (0)