fix: null setting when cancelling prompt
This commit is contained in:
parent
1ce493fe58
commit
7fd3e70099
21
main.js
21
main.js
|
@ -947,17 +947,20 @@ function editsetting(name)
|
|||
if (type != "undefined")
|
||||
{
|
||||
value = prompt(name, value);
|
||||
if (type == "number")
|
||||
if (value !== null)
|
||||
{
|
||||
value = parseInt(value);
|
||||
if (type == "number")
|
||||
{
|
||||
value = parseInt(value);
|
||||
}
|
||||
else if (type == "boolean")
|
||||
{
|
||||
value = value === "true";
|
||||
}
|
||||
settings[name] = value;
|
||||
savesettings();
|
||||
loadsettings();
|
||||
}
|
||||
else if (type == "boolean")
|
||||
{
|
||||
value = value === "true";
|
||||
}
|
||||
settings[name] = value;
|
||||
savesettings();
|
||||
loadsettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue