Browse Source

fix(docs/codes): Patch footnotes array support

Fixes bug that was noticeable when more than one code with a footnote array was present in a table.  The symptoms were:
- footnote descriptions were duplicated
- footnote refs were not rendered
xmkb
innovaker 4 years ago
parent
commit
c57c70465a
  1. 2
      docs/src/components/codes/Table.jsx

2
docs/src/components/codes/Table.jsx

@ -19,7 +19,7 @@ function extractFootnoteIds(codes) { @@ -19,7 +19,7 @@ function extractFootnoteIds(codes) {
new Set(
codes
.flatMap(({ footnotes }) => Object.values(footnotes))
.map((refs) => (Array.isArray(refs) ? refs.flat() : refs))
.flatMap((refs) => (Array.isArray(refs) ? refs.flat() : refs))
)
);
}

Loading…
Cancel
Save