Skip to content

Commit

Permalink
fix(findSubtitle): add start index to final index after slice (#2460)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcbroom authored Sep 12, 2024
1 parent 6f8e7c3 commit f526149
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/Playback/SubtitleTrack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const predicate = (d: Dialogue) => d.start <= playbackManager.currentTime && d.e
const findSubtitle = (dialogue: ParsedSubtitleTrack['dialogue'], start = 0) => {
const index = dialogue.slice(start).findIndex(d => predicate(d));
return index === -1 ? undefined : index;
return index === -1 ? undefined : index + start;
};
const dialogue = computed(() => playerElement.currentExternalSubtitleTrack?.parsed?.dialogue);
Expand Down

0 comments on commit f526149

Please sign in to comment.