aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/captions.js
diff options
context:
space:
mode:
authorAlbin Larsson <mail@albinlarsson.com>2018-02-06 02:39:01 +0100
committerAlbin Larsson <mail@albinlarsson.com>2018-02-06 02:39:01 +0100
commit98adb8e7841c08758e26d51278eb0c5cfc7af5c4 (patch)
treee14470f87410a0ae2ac7cd522baee907d8000dec /src/js/captions.js
parentf67315e20c05c79e7e23db3fa0a72cac4563b887 (diff)
downloadplyr-98adb8e7841c08758e26d51278eb0c5cfc7af5c4.tar.lz
plyr-98adb8e7841c08758e26d51278eb0c5cfc7af5c4.tar.xz
plyr-98adb8e7841c08758e26d51278eb0c5cfc7af5c4.zip
Fix harmless but annoying IE error 'IndexSizeError'
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 847ef7ff..28ea266b 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