Fix mistake after using attributesByName instead of attributes

This commit is contained in:
Joseph Garrone 2024-06-03 23:25:02 +02:00
parent 3c28a05746
commit b780d7136e

View File

@ -137,7 +137,11 @@ export function useUserProfileForm(params: ParamsOfUseUserProfileForm): ReturnTy
const attributes = (() => { const attributes = (() => {
retrocompat_patch: { retrocompat_patch: {
if ("profile" in kcContext && "attributes" in kcContext.profile && Object.keys(kcContext.profile.attributesByName).length !== 0) { if (
"profile" in kcContext &&
"attributesByName" in kcContext.profile &&
Object.keys(kcContext.profile.attributesByName).length !== 0
) {
break retrocompat_patch; break retrocompat_patch;
} }