diff --git a/pages/userInfo/editProfile.tsx b/pages/userInfo/editProfile.tsx index dddebca..013d5cb 100644 --- a/pages/userInfo/editProfile.tsx +++ b/pages/userInfo/editProfile.tsx @@ -35,7 +35,7 @@ export default function EditProfile({ _imageSrc, userInfo }: ProfileProps) { } = UseForm({ mode: 'onChange' }); const capitalizeFirstLetter = (str: string) => { - return (str || '').charAt(0).toUpperCase() + str.slice(1).toLowerCase(); + return (str || '').charAt(0).toUpperCase() + (str || '').slice(1).toLowerCase(); } const [buttonState, setButtonState] = useState(capitalizeFirstLetter(userInfo?.gender));