mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-13 15:36:42 +08:00
fixed undefined config errors
This commit is contained in:
parent
a4c60fd387
commit
f09494fabb
1 changed files with 5 additions and 0 deletions
|
@ -169,6 +169,11 @@ function loadConfigFromCookie() {
|
|||
}
|
||||
|
||||
function applyConfig(configObj) {
|
||||
if (configObj == null || configObj == undefined) {
|
||||
Misc.showNotification("Could not apply config", 1000);
|
||||
console.error("configobj is null or undefined");
|
||||
return;
|
||||
}
|
||||
Object.keys(defaultConfig).forEach((configKey) => {
|
||||
if (configObj[configKey] === undefined) {
|
||||
configObj[configKey] = defaultConfig[configKey];
|
||||
|
|
Loading…
Reference in a new issue