Skip to content

Commit

Permalink
Fix null may cause Update config failed
Browse files Browse the repository at this point in the history
  • Loading branch information
lifegpc committed Jan 1, 2024
1 parent 7933a18 commit f6b5d25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions routes/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit f6b5d25

Please sign in to comment.