From 4375d06ec314b94046ab6abbf13b22bc249cf003 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Sat, 5 Oct 2024 09:41:20 +0200 Subject: [PATCH] #679 (patch for v25) --- src/KcAccountUiLoader.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/KcAccountUiLoader.tsx b/src/KcAccountUiLoader.tsx index 1b29fe9..e46385d 100644 --- a/src/KcAccountUiLoader.tsx +++ b/src/KcAccountUiLoader.tsx @@ -379,7 +379,11 @@ function init( data.userProfileMetadata ??= {}; data.userProfileMetadata.attributes ??= []; - if (!data.userProfileMetadata.attributes.includes("locale")) { + if ( + !data.userProfileMetadata.attributes.find( + (attribute: any) => attribute.name === "locale", + ) + ) { wasLocaleAttributeManuallyAdded = true; data.userProfileMetadata.attributes.unshift({ name: "locale",