mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 18:41:21 +00:00
feat: resolved ts error in rhf
This commit is contained in:
+2
-3
@@ -131,9 +131,8 @@ export const AccessPolicyForm = ({
|
||||
formState: { isSubmitting }
|
||||
} = useForm<TFormSchema>({
|
||||
resolver: zodResolver(formSchema),
|
||||
// @ts-expect-error due to collision of approver type
|
||||
values: editValues
|
||||
? {
|
||||
? ({
|
||||
...editValues,
|
||||
environment: editValues.environment,
|
||||
userApprovers:
|
||||
@@ -177,7 +176,7 @@ export const AccessPolicyForm = ({
|
||||
},
|
||||
[] as { user: Approver[]; group: Approver[]; sequence?: number; approvals: number }[]
|
||||
)
|
||||
}
|
||||
} as TFormSchema)
|
||||
: undefined,
|
||||
defaultValues: {
|
||||
sequenceApprovers: [{ approvals: 1 }]
|
||||
|
||||
Reference in New Issue
Block a user