mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-10 21:53:13 +08:00
fixed an issue where people without the difficulty or blind mode being set would not have results saved
This commit is contained in:
parent
6c7d8e44d6
commit
656af17815
1 changed files with 9 additions and 1 deletions
|
@ -56,6 +56,14 @@ function loadConfigFromCookie() {
|
|||
}
|
||||
config = newConfig;
|
||||
}
|
||||
if(config.difficulty == undefined){
|
||||
config.difficulty = "normal";
|
||||
saveConfigToCookie();
|
||||
}
|
||||
if(config.blindMode == undefined){
|
||||
config.blindMode = false;
|
||||
saveConfigToCookie();
|
||||
}
|
||||
}
|
||||
|
||||
function showTestConfig() {
|
||||
|
@ -68,7 +76,7 @@ function hideTestConfig() {
|
|||
|
||||
//difficulty
|
||||
function setDifficulty(diff, nosave){
|
||||
if(diff !== "normal" && diff !== "expert" && diff !== "master"){
|
||||
if((diff !== "normal" && diff !== "expert" && diff !== "master") || diff == undefined){
|
||||
diff = "normal";
|
||||
}
|
||||
config.difficulty = diff;
|
||||
|
|
Loading…
Reference in a new issue