aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/captions.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/captions.js')
-rw-r--r--src/js/captions.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/captions.js b/src/js/captions.js
index 13244f12..b1f448de 100644
--- a/src/js/captions.js
+++ b/src/js/captions.js
@@ -124,7 +124,8 @@ const captions = {
setCue(input) {
// Get the track from the event if needed
const track = utils.is.event(input) ? input.target : input;
- const active = track.activeCues[0];
+ const {activeCues} = track;
+ const active = activeCues.length && activeCues[0];
const currentTrack = captions.getCurrentTrack.call(this);
// Only display current track