From 548c3da0b432bf8e4651f14b797741cbc36a2a14 Mon Sep 17 00:00:00 2001 From: virgilchiriac <17074330+virgilchiriac@users.noreply.github.com> Date: Thu, 21 Dec 2023 13:05:52 +0100 Subject: [PATCH] BC-6097 - fix filter when school has no system (#3375) --- controllers/login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/login.js b/controllers/login.js index a48eb871fb..519eb4efa8 100644 --- a/controllers/login.js +++ b/controllers/login.js @@ -320,7 +320,7 @@ const determineRedirectUrl = (req) => { const filterSchoolsWithLdapLogin = (schools) => schools // eslint-disable-next-line max-len - .filter((school) => school.systems.some((system) => system.type === 'ldap' && !system.oauthConfig)); + .filter((school) => school.systems?.some((system) => system.type === 'ldap' && !system.oauthConfig)); async function getOauthSystems(req) { return api(req, { version: 'v3' })