Skip to content

Commit

Permalink
fix error type in use-handle-form-submission (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvice authored Nov 23, 2022
1 parent 6a195bd commit 0cde08e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/apiHooks/useHandleFormSubmission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function useHandleFormSubmission<F extends FieldValues, Response>(
let apiErrorMessage: string | null = null

if (isAxiosError) {
const axiosError = error as AxiosError<ErrorBody>
const axiosError = error as AxiosError<ErrorBody | undefined>

if (axiosError.response?.data?.errors) {
const errors = joinFieldErrorMessages(
Expand Down

0 comments on commit 0cde08e

Please sign in to comment.