File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
src/app/(docs)/[[...slug]] Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 66 "build" : " next build" ,
77 "dev" : " next dev" ,
88 "start" : " next start" ,
9- "postinstall" : " fumadocs-mdx"
9+ "postinstall" : " fumadocs-mdx" ,
10+ "lint" : " next lint"
1011 },
1112 "dependencies" : {
1213 "@theguild/remark-mermaid" : " ^0.3.0" ,
Original file line number Diff line number Diff line change @@ -29,9 +29,11 @@ export default async function Page(props: {
2929 components = { {
3030 ...defaultMdxComponents ,
3131 a : createRelativeLink ( source , page ) ,
32- img : ( props : React . ImgHTMLAttributes < HTMLImageElement > ) => (
33- < ImageZoom { ...props } />
34- ) ,
32+ img : ( props : React . ImgHTMLAttributes < HTMLImageElement > ) => {
33+ const { src, ...rest } = props ;
34+ if ( typeof src !== "string" ) return null ;
35+ return < ImageZoom src = { src } { ...rest } /> ;
36+ } ,
3537 pre : ( props ) => (
3638 < CodeBlock { ...props } >
3739 < Pre > { props . children } </ Pre >
You can’t perform that action at this time.
0 commit comments