mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Handle invalid current minDuration in options.js
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user