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.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 (