Skip to content

Commit 0b8c2d3

Browse files
anth-volkCopilot
andauthored
Update src/layout/MarkdownFormatter.jsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 56377de commit 0b8c2d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/layout/MarkdownFormatter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ export function MarkdownFormatter({ markdown, backgroundColor, dict, pSize }) {
369369
// If href=#user-content-fn-1, id should be user-content-fnref-1 and vice versa
370370
if (href.startsWith("#user-content-fn-")) {
371371
id = href.replace("#user-content-fn-", "user-content-fnref-");
372-
footnoteNumber = parseInt(id?.split("-").pop());
372+
footnoteNumber = parseInt(id?.split("-").pop() || "0");
373373
} else if (href.startsWith("#user-content-fnref-")) {
374374
id = href.replace("#user-content-fnref-", "user-content-fn-");
375375
} else {

0 commit comments

Comments
 (0)