Skip to content

Commit

Permalink
BC-6097 - fix filter when school has no system (#3375)
Browse files Browse the repository at this point in the history
  • Loading branch information
virgilchiriac committed Dec 21, 2023
1 parent 40a7e41 commit 548c3da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand Down

0 comments on commit 548c3da

Please sign in to comment.