fix issue where oidc config form was not loading due to oidc_logos being undefined

This commit is contained in:
Peter Clement 2021-07-08 11:15:22 +01:00
parent 2e49686eab
commit 99de767781
1 changed files with 4 additions and 2 deletions

View File

@ -138,6 +138,8 @@
//This needs to be done before the config call so 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 res = await api.get(`/api/admin/configs/oidc_logos`)
const configSettings = await res.json() const configSettings = await res.json()
if (configSettings.config) {
const logoKeys = Object.keys(configSettings.config) const logoKeys = Object.keys(configSettings.config)
logoKeys.map(logoKey => { logoKeys.map(logoKey => {
@ -148,7 +150,7 @@
icon: logoUrl, icon: logoUrl,
}) })
}) })
}
const oidcResponse = await api.get(`/api/admin/configs/${ConfigTypes.OIDC}`) const oidcResponse = await api.get(`/api/admin/configs/${ConfigTypes.OIDC}`)
const oidcDoc = await oidcResponse.json() const oidcDoc = await oidcResponse.json()