Skip to content

Commit

Permalink
Return from useEffect when no markdown data (#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackreimers authored Jul 18, 2023
1 parent da39fc7 commit 963ead9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/blocks/tableLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export const TableLayout = ({ data }) => {
const md = new MarkdownIt().use(markdownItMultimdTable, {
multiline: true,
});

if (!data.mdxTable) return;

const html = md.render(data.mdxTable);
setMdxTableString(html);
}, [data]);
Expand Down

0 comments on commit 963ead9

Please sign in to comment.