Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/form-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function changeFormValue<T, A extends keyof T, U extends T[A]>(
fieldName: A | string,
value: GenericTypeOfFormField<U>,
): T {
const fieldNameArr: string[] = typeof fieldName === 'string' ? fieldName.split('.') : [fieldName as string]
const fieldNameArr: string[] = typeof fieldName === 'string' ? fieldName.split('.') : [fieldName as unknown as string]
const firstKey = fieldNameArr.shift()
return Object.keys(formToChange).reduce((prev: T, key) => {
const field = formToChange[key]
Expand Down