diff --git a/public/pages/adminpage/ctrl_backend_component_storage.js b/public/pages/adminpage/ctrl_backend_component_storage.js index 473768261..dd5d92e75 100644 --- a/public/pages/adminpage/ctrl_backend_component_storage.js +++ b/public/pages/adminpage/ctrl_backend_component_storage.js @@ -118,7 +118,7 @@ export default async function(render) { const saveConnections = () => rxjs.pipe( rxjs.mergeMap((connections) => getState().pipe(rxjs.map((config) => { - config.connections = connections; + if (Array.isArray(connections)) config.connections = connections; return config; }))), saveConfig(), diff --git a/public/pages/adminpage/ctrl_backend_state.js b/public/pages/adminpage/ctrl_backend_state.js index bb3d5a243..45167dc4a 100644 --- a/public/pages/adminpage/ctrl_backend_state.js +++ b/public/pages/adminpage/ctrl_backend_state.js @@ -11,7 +11,7 @@ const backendsEnabled$ = new rxjs.BehaviorSubject([]); export async function initStorage() { return await getConfig().pipe( rxjs.map(({ connections }) => connections), - rxjs.tap((connections) => backendsEnabled$.next(connections)), + rxjs.tap((connections) => backendsEnabled$.next(Array.isArray(connections) ? connections : [])), ).toPromise(); }