Fixed typescript issues.

This commit is contained in:
Ajay Ramachandran
2020-02-08 19:10:04 -05:00
parent 885fae175d
commit 4e1eb82538
3 changed files with 10 additions and 8 deletions

View File

@@ -77,19 +77,19 @@ async function init() {
break;
case "number-change":
let numberChangeOption = optionsElements[i].getAttribute("sync-option");
let configValue = SB.config[numberChangeOption];
let configValue = Config.config[numberChangeOption];
let numberInput = optionsElements[i].querySelector("input");
if (isNaN(configValue) || configValue < 0) {
numberInput.value = SB.defaults[numberChangeOption];
numberInput.value = Config.defaults[numberChangeOption];
} else {
numberInput.value = configValue;
}
numberInput.addEventListener("input", () => {
SB.config[numberChangeOption] = numberInput.value;
Config.config[numberChangeOption] = numberInput.value;
});
break;
}
}