Skip to content

Commit

Permalink
🐾🎵 Prevent app crash when footnotes do not exist (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 authored Oct 2, 2024
1 parent d175a30 commit 50c6258
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/small-carrots-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'myst-to-react': patch
---

App failure when no footnote definition
2 changes: 1 addition & 1 deletion packages/myst-to-react/src/footnotes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function FootnoteDefinition({ identifier }: { identifier: string }) {
return (
<XRefProvider>
<div className="hover-document article w-[500px] sm:max-w-[500px] px-3 text-sm">
<MyST ast={node.children} />
<MyST ast={node?.children} />
</div>
</XRefProvider>
);
Expand Down

0 comments on commit 50c6258

Please sign in to comment.