Skip to content

Commit

Permalink
Fix runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
ptgott committed Nov 18, 2024
1 parent 70c8520 commit f25ffe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/rehype-hljs-var.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const rehypeVarInHLJS = (
visit(root, undefined, (node: Node, index: number, parent: Parent) => {
const el = node as Element;
// We only visit code fences
if (!node.hasOwnProperty("tagName") || el.tagName !== "code") {
if (!el || el.tagName !== "code") {
return [CONTINUE];
}

Expand Down

0 comments on commit f25ffe2

Please sign in to comment.