Skip to content

Commit

Permalink
Merge pull request #856 from AI4Bharat/compare-edits
Browse files Browse the repository at this point in the history
Compare edits-transcript fix
  • Loading branch information
aparna-aa authored Dec 13, 2024
2 parents b634730 + 0ade077 commit 00674df
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/common/CompareEdits.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,13 @@ const CompareEdits = ({

data.transcripts.forEach((transcript) => {
if (transcript.status === "TRANSCRIPTION_EDIT_COMPLETE") {
editComplete.push(
...transcript.data.payload.map((item) => item.verbatim_text)
);
transcript.data.payload.forEach((item) => {
if (item.verbatim_text && item.verbatim_text.trim() !== "") {
editComplete.push(item.verbatim_text);
}else{
editComplete.push(item.text);
}
})
} else if (transcript.status === "TRANSCRIPTION_SELECT_SOURCE") {
selectSource.push(
...transcript.data.payload.map((item) => item.text)
Expand Down

0 comments on commit 00674df

Please sign in to comment.