Skip to content

Commit 3278ff2

Browse files
authored
fix(readme): useDynamicImport may return null (#3) (#4)
1 parent 125e5a1 commit 3278ff2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ import { useDynamicImport } from 'docusaurus-plugin-react-docgen-typescript/pkg/
6464

6565
export const PropTable = ({ name }) => {
6666
const props = useDynamicImport(name);
67+
68+
if (!props) {
69+
return null;
70+
}
6771

6872
return (
6973
<table>

0 commit comments

Comments
 (0)