diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-10-21 18:01:13 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-10-21 18:01:13 +0200 |
| commit | 07cfcc049e8d7bf437b732808397d7b41be9f841 (patch) | |
| tree | 89473ba8d5ebb15b85117e6bb07af58cc38e75d4 /animism-align/frontend/app/utils | |
| parent | 3b0adaf902920a06efc141df58abd0368bd724b6 (diff) | |
adding the footnotes..
Diffstat (limited to 'animism-align/frontend/app/utils')
| -rw-r--r-- | animism-align/frontend/app/utils/transcript.utils.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/animism-align/frontend/app/utils/transcript.utils.js b/animism-align/frontend/app/utils/transcript.utils.js index 2a089a0..a8f889c 100644 --- a/animism-align/frontend/app/utils/transcript.utils.js +++ b/animism-align/frontend/app/utils/transcript.utils.js @@ -91,9 +91,13 @@ export const buildParagraphs = (annotationOrder, sectionCount, footnoteCount) => if (annotation.type === 'footnote') { // bump footnote count and attach it to this annotation, so we can find it later footnoteCount += 1 - annotation.footnote_id = footnoteCount + if (!annotation.footnote_id || annotation.footnote_id === 1) { + annotation.footnote_id = footnoteCount + } // set annotation start point to the start of the previous sentence - annotation.start_ts = currentParagraph.annotations[currentParagraph.annotations.length - 1].start_ts + if (currentParagraph.annotations[currentParagraph.annotations.length - 1]) { + annotation.start_ts = currentParagraph.annotations[currentParagraph.annotations.length - 1].start_ts + } footnotes.push(annotation) } |
