lots of components dont respect the type and pass undefined

This commit is contained in:
Diego Imbert
2025-04-16 17:21:41 +02:00
parent 712ed88568
commit 37ae6551b7
@@ -2,7 +2,7 @@
<script lang="ts">
type Props = {
code: string
code?: string
fontSize: number
marginLeft?: string
className?: string
@@ -25,7 +25,7 @@
style="font-size: {fontSize}px;"
>
{code}
{#if code.endsWith('\n')}
{#if code?.endsWith('\n')}
&nbsp;
{/if}
</code>