Fix captions.toggle() if there is no toggle button
This commit is contained in:
parent
20f2ddc11d
commit
81c5477f1d
@ -191,8 +191,10 @@ const captions = {
|
||||
return;
|
||||
}
|
||||
|
||||
// Toggle state
|
||||
this.elements.buttons.captions.pressed = active;
|
||||
// Toggle button if it's enabled
|
||||
if (this.elements.buttons.captions) {
|
||||
this.elements.buttons.captions.pressed = active;
|
||||
}
|
||||
|
||||
// Add class hook
|
||||
toggleClass(this.elements.container, activeClass, active);
|
||||
|
Loading…
x
Reference in New Issue
Block a user