Prevent invalid YAML config from bricking the UI
This commit is contained in:
1 parent
98698b775c
commit
529386a9b6
3 files changed
+12
-5
No files matched your search
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user