diff options
author | Sam Potts <sam@potts.es> | 2018-04-11 23:42:40 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 23:42:40 +1000 |
commit | ffd265d0ae5fc146cb56aa1f99026fd2f98ff529 (patch) | |
tree | b4e401b3e3e62398994483330942c8193aec08d2 /src/js/plyr.js | |
parent | 9b7170834e568bb82767e0306cf6e23f7959f0fe (diff) | |
parent | 72155472dd2f0899f819fcd530def2a65707e940 (diff) | |
download | plyr-ffd265d0ae5fc146cb56aa1f99026fd2f98ff529.tar.lz plyr-ffd265d0ae5fc146cb56aa1f99026fd2f98ff529.tar.xz plyr-ffd265d0ae5fc146cb56aa1f99026fd2f98ff529.zip |
Merge pull request #888 from Antonio-Laguna/master
Safer check for active caption
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 6be0d2cc..04a68d02 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -845,7 +845,7 @@ class Plyr { } // If the method is called without parameter, toggle based on current value - const show = utils.is.boolean(input) ? input : this.elements.container.className.indexOf(this.config.classNames.captions.active) === -1; + const show = utils.is.boolean(input) ? input : !this.elements.container.classList.contains(this.config.classNames.captions.active); // Nothing to change... if (this.captions.active === show) { |