File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/console/src/pages/UserDetails/UserSettings Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11import { emailRegEx , usernameRegEx } from '@logto/core-kit' ;
22import type { User } from '@logto/schemas' ;
33import { parsePhoneNumber } from '@logto/shared/universal' ;
4- import { trySafe } from '@silverhand/essentials' ;
4+ import { conditionalString , trySafe } from '@silverhand/essentials' ;
55import { parsePhoneNumberWithError } from 'libphonenumber-js' ;
66import { useForm , useController } from 'react-hook-form' ;
77import { toast } from 'react-hot-toast' ;
@@ -79,7 +79,7 @@ function UserSettings() {
7979
8080 const payload : Partial < User > = {
8181 ...formData ,
82- primaryPhone : parsePhoneNumber ( primaryPhone ) ,
82+ primaryPhone : conditionalString ( primaryPhone && parsePhoneNumber ( primaryPhone ) ) ,
8383 customData : parseResult . data ,
8484 } ;
8585
You can’t perform that action at this time.
0 commit comments