Skip to content

Commit

Permalink
fix: sometimes subtitlesTrack_.cues is null (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysm-dev authored Feb 17, 2021
1 parent 97ab712 commit 6778ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vtt-segment-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class VTTSegmentLoader extends SegmentLoader {
* TimeRange object representing the current buffered ranges
*/
buffered_() {
if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues.length) {
if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {
return videojs.createTimeRanges();
}

Expand Down

0 comments on commit 6778ca1

Please sign in to comment.