diff --git a/app/components/Highlight.tsx b/app/components/Highlight.tsx index dc6d2a4..59c2485 100644 --- a/app/components/Highlight.tsx +++ b/app/components/Highlight.tsx @@ -34,10 +34,10 @@ export const Highlight: ParentComponent = (_props) => { const highlightedCode = createMemo(() => { const childrenString = props.children?.toString(); - if (!childrenString) return; + if (!childrenString) return ""; const grammar = Prismjs.languages[props.language]; - if (!grammar) return; + if (!grammar) return ""; const result = Prismjs.highlight(childrenString, grammar, props.language); @@ -102,7 +102,10 @@ export const Highlight: ParentComponent = (_props) => { )}