diff options
Diffstat (limited to 'animism-align/frontend/app/utils/transcript.utils.js')
| -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) } |
