aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/captions.js
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-11 11:08:56 -0500
committerJesús <heckyel@hyperbola.info>2022-02-11 11:08:56 -0500
commit69e20fc11381bdc94c416f11527289a34ffb89ed (patch)
tree4b8969904958e4a377a9dd00cabd972c1ce22429 /src/js/captions.js
parent421de00c8bb27fd0cd01d19ed4c2681ef2d63446 (diff)
downloadplyr-master.tar.lz
plyr-master.tar.xz
plyr-master.zip
update from upstreamHEADmaster
Diffstat (limited to 'src/js/captions.js')
-rw-r--r--src/js/captions.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/captions.js b/src/js/captions.js
index 98d7d613..856baccf 100644
--- a/src/js/captions.js
+++ b/src/js/captions.js
@@ -154,7 +154,9 @@ const captions = {
}
// Enable or disable captions based on track length
- toggleClass(this.elements.container, this.config.classNames.captions.enabled, !is.empty(tracks));
+ if (this.elements) {
+ toggleClass(this.elements.container, this.config.classNames.captions.enabled, !is.empty(tracks));
+ }
// Update available languages in list
if (