update prompt version and lint

This commit is contained in:
Araxeus
2021-05-05 02:53:05 +03:00
parent 98c00f7a60
commit 5cee331abe
4 changed files with 35 additions and 34 deletions

View File

@ -335,10 +335,10 @@ function setProxy(item, win) {
});
}
prompt(options, win)
.then(input => {
if (input !== null && input !== example) {
config.set("options.proxy", input);
item.checked = input !== "";
.then(output => {
if (output !== null && output !== example) {
config.set("options.proxy", output);
item.checked = output !== "";
} else { //user pressed cancel
item.checked = !item.checked; //reset checkbox
}