bbc/react-transcript-editor

Empty transcription causes error for digitalpaperedit transcripts

emettely opened this issue · 0 comments

Describe the bug

When the transcriptData is empty like so:

{
  words: [],
  paragraphs: []
}

it throws an error.

To Reproduce
Steps to reproduce the behavior:

  1. Insert empty transcript data as above
  2. see error

Expected behavior
Empty transcript shouldn't be considered an error.

Screenshots
Screenshot 2020-04-20 at 14 43 48

Screenshot 2020-04-20 at 14 44 00

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context