From b780d7136efedda2aaaf6a165e3648a2cda85197 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Mon, 3 Jun 2024 23:25:02 +0200 Subject: [PATCH] Fix mistake after using attributesByName instead of attributes --- src/login/lib/useUserProfileForm.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/login/lib/useUserProfileForm.tsx b/src/login/lib/useUserProfileForm.tsx index 309d7a93..3ba2570e 100644 --- a/src/login/lib/useUserProfileForm.tsx +++ b/src/login/lib/useUserProfileForm.tsx @@ -137,7 +137,11 @@ export function useUserProfileForm(params: ParamsOfUseUserProfileForm): ReturnTy const attributes = (() => { 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; }