Skip to content

Commit

Permalink
Do a nullcheck for cues in updateForTrack. Fixes videojs#2870
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev committed Dec 8, 2015
1 parent e78e26b commit 084716d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/tracks/text-track-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ class TextTrackDisplay extends Component {

let i = cues.length;
while (i--) {
let cue = cues[i];
if (!cue) {
continue;
}

let cueDiv = cues[i].displayState;
if (overrides.color) {
cueDiv.firstChild.style.color = overrides.color;
Expand Down

0 comments on commit 084716d

Please sign in to comment.