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
This commit is contained in:
innovaker 2020-11-17 14:46:49 +00:00
parent d5250f0449
commit c57c70465a

View file

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