fixed a bug where the config would not be loaded correctly

This commit is contained in:
Jack 2020-05-14 23:37:43 +01:00
parent 547e56150a
commit eb25f7b48d

View file

@ -21,14 +21,14 @@ function loadConfigFromCookie() {
let newConfig = $.cookie('config');
if (newConfig) {
newConfig = JSON.parse(newConfig);
setTheme(newConfig.theme);
setQuickTabMode(newConfig.quickTab);
setPunctuation(newConfig.punctuation);
setKeyTips(newConfig.showKeyTips);
changeTimeConfig(newConfig.time);
changeWordCount(newConfig.words);
changeMode(newConfig.mode);
config = newConfig;
setTheme(config.theme);
setQuickTabMode(config.quickTab);
setPunctuation(config.punctuation);
setKeyTips(config.showKeyTips);
changeTimeConfig(config.time);
changeWordCount(config.words);
changeMode(config.mode);
restartTest();
}
}