Skip to content
Snippets Groups Projects
Commit 293cb88d authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Don't fail when there is no GitLab server configured

parent 5ef8faec
Branches
Tags
No related merge requests found
......@@ -22,7 +22,7 @@ const { github, gitlabAccessToken, openIdConnectByName, parametersRepository } =
config
const issuerTitleByName = {
...Object.fromEntries(
Object.entries(openIdConnectByName).map(([name, { title }]) => [
Object.entries(openIdConnectByName ?? {}).map(([name, { title }]) => [
name,
title,
]),
......@@ -31,7 +31,7 @@ const issuerTitleByName = {
} as { [name: string]: string }
const issuerUrlByName = {
...Object.fromEntries(
Object.entries(openIdConnectByName).map(([name, { issuerUrl }]) => [
Object.entries(openIdConnectByName ?? {}).map(([name, { issuerUrl }]) => [
name,
issuerUrl,
]),
......
......@@ -7,7 +7,7 @@ const { openIdConnectByName } = config
export const load: LayoutServerLoad = ({ params }) => {
const { name } = params
if (!Object.keys(openIdConnectByName).includes(name)) {
if (!Object.keys(openIdConnectByName ?? {}).includes(name)) {
error(404, `Fournisseur d'identité OpenID Connect inconnu : ${name}`)
}
return {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment