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