Use defaults if it the config is broken

This commit is contained in:
Ajay Ramachandran
2020-01-24 21:44:24 -05:00
committed by GitHub
parent 34a21c6d8c
commit a685950a66

View File

@@ -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");
}
}