Skip to content

Commit

Permalink
fix: can not update profile image, close #2267
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Dec 25, 2024
1 parent 1478446 commit d42f52d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/renderer/src/modules/profile/profile-setting-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
Expand All @@ -43,7 +43,7 @@ export const ProfileSettingForm = ({
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
handle: user?.handle || "",
handle: user?.handle || undefined,
name: user?.name || "",
image: user?.image || "",
},
Expand Down

0 comments on commit d42f52d

Please sign in to comment.