aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2020-01-24 21:44:24 -0500
committerGitHub <[email protected]>2020-01-24 21:44:24 -0500
commita685950a665b1082b9e45459a5721e513e01c175 (patch)
tree4486dda9cc9be7c16f7bdae0dc038f2b00b7f789
parent34a21c6d8cb2651846a692a7532f0520aaebc47b (diff)
downloadSponsorBlock-a685950a665b1082b9e45459a5721e513e01c175.tar.gz
SponsorBlock-a685950a665b1082b9e45459a5721e513e01c175.zip
Use defaults if it the config is broken
-rw-r--r--options/options.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/options/options.js b/options/options.js
index 22529d9e..0cd168bf 100644
--- a/options/options.js
+++ b/options/options.js
@@ -76,7 +76,7 @@ async function init() {
let numberInput = optionsElements[i].querySelector("input");
if (isNaN(configValue) || configValue < 0) {
- numberInput.value = 0;
+ numberInput.value = SB.defaults[numberChangeOption];
} else {
numberInput.value = configValue;
}
@@ -306,4 +306,4 @@ function activateTextChange(element) {
});
element.querySelector(".option-hidden-section").classList.remove("hidden");
-} \ No newline at end of file
+}