diff --git a/apps/renderer/src/modules/profile/profile-setting-form.tsx b/apps/renderer/src/modules/profile/profile-setting-form.tsx index 24c51ae55a..d2ad59f37f 100644 --- a/apps/renderer/src/modules/profile/profile-setting-form.tsx +++ b/apps/renderer/src/modules/profile/profile-setting-form.tsx @@ -25,7 +25,7 @@ import { CopyButton } from "~/components/ui/code-highlighter" import { toastFetchError } from "~/lib/error-parser" const formSchema = z.object({ - handle: z.string().max(50), + handle: z.string().max(50).optional(), name: z.string().min(3).max(50), image: z.string().url(), }) @@ -43,7 +43,7 @@ export const ProfileSettingForm = ({ const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { - handle: user?.handle || "", + handle: user?.handle || undefined, name: user?.name || "", image: user?.image || "", },