Merge pull request #1695 from CzBiX/patch-2

Fix issue when controls config is string or element
This commit is contained in:
Sam Potts 2020-02-19 08:57:26 +11:00 committed by GitHub
commit 977a8393f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,7 +151,8 @@ const captions = {
toggleClass(this.elements.container, this.config.classNames.captions.enabled, !is.empty(tracks));
// Update available languages in list
if ((this.config.controls || []).includes('settings') && this.config.settings.includes('captions')) {
if ((is.array(this.config.controls) && this.config.controls.includes('settings'))
&& this.config.settings.includes('captions')) {
controls.setCaptionsMenu.call(this);
}
},