From 98adb8e7841c08758e26d51278eb0c5cfc7af5c4 Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Tue, 6 Feb 2018 02:39:01 +0100 Subject: [PATCH] Fix harmless but annoying IE error 'IndexSizeError' --- src/js/captions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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