mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-04 15:39:45 +00:00
fix: user can't update account if email is empty
This commit is contained in:
@@ -46,7 +46,10 @@
|
|||||||
});
|
});
|
||||||
type FormSchema = typeof formSchema;
|
type FormSchema = typeof formSchema;
|
||||||
|
|
||||||
const { inputs, ...form } = createForm<FormSchema>(formSchema, account);
|
const { inputs, ...form } = createForm<FormSchema>(formSchema, {
|
||||||
|
...account,
|
||||||
|
email: account.email || ''
|
||||||
|
});
|
||||||
|
|
||||||
function onNameInput() {
|
function onNameInput() {
|
||||||
if (!hasManualDisplayNameEdit) {
|
if (!hasManualDisplayNameEdit) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
.optional(),
|
.optional(),
|
||||||
smtpUser: z.string().optional(),
|
smtpUser: z.string().optional(),
|
||||||
smtpPassword: z.string().optional(),
|
smtpPassword: z.string().optional(),
|
||||||
smtpFrom: z.email().optional(),
|
smtpFrom: z.email().or(z.literal('')).optional(),
|
||||||
smtpTls: z.enum(['none', 'starttls', 'tls']),
|
smtpTls: z.enum(['none', 'starttls', 'tls']),
|
||||||
smtpSkipCertVerify: z.boolean(),
|
smtpSkipCertVerify: z.boolean(),
|
||||||
emailOneTimeAccessAsUnauthenticatedEnabled: z.boolean(),
|
emailOneTimeAccessAsUnauthenticatedEnabled: z.boolean(),
|
||||||
|
|||||||
Reference in New Issue
Block a user