From 99de767781b7032a01400006f94c47c56935f700 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Thu, 8 Jul 2021 11:15:22 +0100 Subject: [PATCH] fix issue where oidc config form was not loading due to oidc_logos being undefined --- .../src/pages/builder/portal/manage/auth/index.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/auth/index.svelte b/packages/builder/src/pages/builder/portal/manage/auth/index.svelte index 1b74e9aaac..3f4b39bd4e 100644 --- a/packages/builder/src/pages/builder/portal/manage/auth/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/auth/index.svelte @@ -135,9 +135,11 @@ } //Get the list of user uploaded logos and push it to the dropdown options. - //This needs to be done before the config callso they're available when the dropdown renders + //This needs to be done before the config call so they're available when the dropdown renders const res = await api.get(`/api/admin/configs/oidc_logos`) const configSettings = await res.json() + + if (configSettings.config) { const logoKeys = Object.keys(configSettings.config) logoKeys.map(logoKey => { @@ -148,7 +150,7 @@ icon: logoUrl, }) }) - + } const oidcResponse = await api.get(`/api/admin/configs/${ConfigTypes.OIDC}`) const oidcDoc = await oidcResponse.json()