Skip to content

Commit

Permalink
fix(readme): useDynamicImport may return null (#3) (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbach committed Jun 21, 2021
1 parent 125e5a1 commit 3278ff2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -64,6 +64,10 @@ import { useDynamicImport } from 'docusaurus-plugin-react-docgen-typescript/pkg/

export const PropTable = ({ name }) => {
const props = useDynamicImport(name);

if (!props) {
return null;
}

return (
<table>
Expand Down

0 comments on commit 3278ff2

Please sign in to comment.