File tree Expand file tree Collapse file tree
features/admin.users.v1/components/user-profile/fields Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @wso2is/admin.users.v1 " : patch
3+ " @wso2is/console " : patch
4+ ---
5+
6+ A fix to dataType mismatch for totpEnabled and backupCodeEnabled claims.
Original file line number Diff line number Diff line change @@ -435,7 +435,11 @@ const ProfileFormFieldRenderer: FunctionComponent<ProfileFormFieldRendererPropsI
435435 return (
436436 < FinalFormField
437437 component = { CheckboxFieldAdapter }
438- initialValue = { initialValue ?? false }
438+ initialValue = {
439+ typeof initialValue === "string"
440+ ? initialValue . toLowerCase ( ) === "true"
441+ : ! ! initialValue
442+ }
439443 ariaLabel = { fieldLabel }
440444 label = { fieldLabel }
441445 name = { fieldName }
@@ -449,7 +453,11 @@ const ProfileFormFieldRenderer: FunctionComponent<ProfileFormFieldRendererPropsI
449453 return (
450454 < FinalFormField
451455 component = { SwitchFieldAdapter }
452- initialValue = { initialValue ?? false }
456+ initialValue = {
457+ typeof initialValue === "string"
458+ ? initialValue . toLowerCase ( ) === "true"
459+ : ! ! initialValue
460+ }
453461 ariaLabel = { fieldLabel }
454462 label = { fieldLabel }
455463 name = { fieldName }
You can’t perform that action at this time.
0 commit comments