mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fill linked institution ids on data fetching (#8042)
GitOrigin-RevId: 5c89d32331e745e3d993d549337c2c413193a2b2
This commit is contained in:
parent
487ff4f505
commit
db1198597d
1 changed files with 6 additions and 0 deletions
|
@ -83,12 +83,18 @@ const setData = (state: State, action: ActionSetData) => {
|
|||
idAttribute: 'email',
|
||||
})
|
||||
const byId = normalized || {}
|
||||
const linkedInstitutionIds = action.payload
|
||||
.filter(email => Boolean(email.samlProviderId))
|
||||
.map(email => email.samlProviderId) as NonNullable<
|
||||
UserEmailData['samlProviderId']
|
||||
>[]
|
||||
|
||||
return {
|
||||
...state,
|
||||
data: {
|
||||
...initialState.data,
|
||||
byId,
|
||||
linkedInstitutionIds,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue