Fix console error
This commit is contained in:
parent
ef7e6a56b4
commit
69671a93d1
1 changed files with 2 additions and 1 deletions
|
@ -20,6 +20,7 @@ export default function SettingDefaultQuality(props: Props) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
// From enabled to disabled -> clear the setting
|
// From enabled to disabled -> clear the setting
|
||||||
|
valueRef.current = defaultQuality;
|
||||||
doSetDefaultVideoQuality(null);
|
doSetDefaultVideoQuality(null);
|
||||||
} else {
|
} else {
|
||||||
setEnabled(true);
|
setEnabled(true);
|
||||||
|
@ -42,7 +43,7 @@ export default function SettingDefaultQuality(props: Props) {
|
||||||
type="select"
|
type="select"
|
||||||
onChange={handleSetQuality}
|
onChange={handleSetQuality}
|
||||||
disabled={!enabled}
|
disabled={!enabled}
|
||||||
value={defaultQuality}
|
value={defaultQuality || valueRef.current}
|
||||||
>
|
>
|
||||||
{VIDEO_QUALITY_OPTIONS.map((quality) => {
|
{VIDEO_QUALITY_OPTIONS.map((quality) => {
|
||||||
const qualityStr = typeof quality === 'number' ? quality + 'p' : toCapitalCase(quality);
|
const qualityStr = typeof quality === 'number' ? quality + 'p' : toCapitalCase(quality);
|
||||||
|
|
Loading…
Reference in a new issue