Prevent invalid YAML config from bricking the UI

This commit is contained in:
Zaid Abdulla committed 2021-09-16 13:27:37 -07:00
1 parent 98698b775c
commit 529386a9b6
3 files changed
+12 -5

No files matched your search

+1 -1
View File
@@ -365,7 +365,7 @@ async function fetchConfig(): Promise<[Config, UiConfig]> {
let ref = ui;
while (keys.length > 1) {
const k = keys.shift();
if (typeof ref[k] !== "object") ref[k] = {};
if (ref[k] == null || typeof ref[k] !== "object") ref[k] = {};
ref = ref[k];
}
ref[keys[0]] = val;