mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-11 09:30:46 +01:00
Handle invalid current minDuration in options.js
This commit is contained in:
parent
e6ef27936e
commit
34a21c6d8c
1 changed files with 4 additions and 1 deletions
|
@ -75,13 +75,16 @@ async function init() {
|
|||
let configValue = SB.config[numberChangeOption];
|
||||
let numberInput = optionsElements[i].querySelector("input");
|
||||
|
||||
if (configValue != undefined) {
|
||||
if (isNaN(configValue) || configValue < 0) {
|
||||
numberInput.value = 0;
|
||||
} else {
|
||||
numberInput.value = configValue;
|
||||
}
|
||||
|
||||
numberInput.addEventListener("input", () => {
|
||||
SB.config[numberChangeOption] = numberInput.value;
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue