From a0cc698592d92b9ae167f8d8912053e8f906f86f Mon Sep 17 00:00:00 2001 From: Mickael Kerjean Date: Mon, 9 Oct 2023 22:33:32 +1100 Subject: [PATCH] fix (admin): backend label name --- public/pages/adminpage/ctrl_backend_component_storage.js | 2 +- public/pages/adminpage/ctrl_backend_state.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(); }