Fix null may cause Update config failed

This commit is contained in:
2024-01-01 16:42:34 +08:00
parent 7933a1809d
commit f6b5d25d9a

View File

@@ -86,6 +86,7 @@ export const handler: Handlers = {
const cfg = await load_settings(path);
let updated = false;
Object.getOwnPropertyNames(d).forEach((k) => {
if (d[k] === null) return;
if (UNSAFE_TYPE2.indexOf(k) === -1) {
cfg._data[k] = d[k];
m.cfg._data[k] = d[k];