Skip to content

Commit

Permalink
fix: ensures confirm password remains on form state (#6190)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpopus committed May 2, 2024
1 parent bdf08a1 commit f2d4156
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/next/src/routes/rest/buildFormState.ts
Expand Up @@ -218,6 +218,8 @@ export const buildFormState = async ({ req }: { req: PayloadRequestWithData }) =
!req.payload.collections[collectionSlug].config.auth.disableLocalStrategy
) {
if (formState.password) result.password = formState.password
if (formState['confirm-password'])
result['confirm-password'] = formState['confirm-password']
if (formState.email) result.email = formState.email
}
}
Expand Down

0 comments on commit f2d4156

Please sign in to comment.