diff options
author | Sam Potts <sam@selz.com> | 2018-02-06 12:51:45 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 12:51:45 +1100 |
commit | 7221e26eca6d6aba66c807c1a1a0cf34010fd88e (patch) | |
tree | d6a80f2d78e237bc3144e5780073c436f62b9596 /src | |
parent | d21b58e1c9c74ed15fb02a76c864177028882416 (diff) | |
parent | 98adb8e7841c08758e26d51278eb0c5cfc7af5c4 (diff) | |
download | plyr-7221e26eca6d6aba66c807c1a1a0cf34010fd88e.tar.lz plyr-7221e26eca6d6aba66c807c1a1a0cf34010fd88e.tar.xz plyr-7221e26eca6d6aba66c807c1a1a0cf34010fd88e.zip |
Merge pull request #780 from friday/captions-ie11-indexsizeerror
Fix harmless but annoying IE error 'IndexSizeError'
Diffstat (limited to 'src')
-rw-r--r-- | src/js/captions.js | 3 |
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 |