Replace switch in controls.updateSetting with condition
This commit is contained in:
parent
c373ed72d7
commit
88735e3146
9
src/js/controls.js
vendored
9
src/js/controls.js
vendored
@ -724,12 +724,9 @@ const controls = {
|
||||
let value = null;
|
||||
let list = container;
|
||||
|
||||
switch (setting) {
|
||||
case 'captions':
|
||||
if (setting === 'captions') {
|
||||
value = this.currentTrack;
|
||||
break;
|
||||
|
||||
default:
|
||||
} else {
|
||||
value = !is.empty(input) ? input : this[setting];
|
||||
|
||||
// Get default
|
||||
@ -748,8 +745,6 @@ const controls = {
|
||||
this.debug.warn(`Disabled value of '${value}' for ${setting}`);
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Get the list if we need to
|
||||
|
Loading…
x
Reference in New Issue
Block a user