fixed undefined config errors

This commit is contained in:
Jack 2020-12-14 04:57:13 +00:00
parent a4c60fd387
commit f09494fabb

View file

@ -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];