Skip to content

Commit 989b683

Browse files
committed
fix(files): use narrow props type for img renderer instead of runtime narrowing
1 parent e4ea468 commit 989b683

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ const STATIC_MARKDOWN_COMPONENTS = {
486486
)
487487
},
488488
hr: () => <hr className='my-6 border-[var(--border)]' />,
489-
img: ({ src, alt }: React.ImgHTMLAttributes<HTMLImageElement>) => {
490-
const resolvedSrc = resolveSimFileUrl(typeof src === 'string' ? src : undefined)
489+
img: ({ src, alt }: { src?: string; alt?: string }) => {
490+
const resolvedSrc = resolveSimFileUrl(src)
491491
return (
492492
<img
493493
src={resolvedSrc}

0 commit comments

Comments
 (0)