Skip to content

Prevent formState.values from initializing to undefined#450

Merged
erikras merged 1 commit intofinal-form:mainfrom
mjchang:undefined-initialize-form-value
Apr 1, 2022
Merged

Prevent formState.values from initializing to undefined#450
erikras merged 1 commit intofinal-form:mainfrom
mjchang:undefined-initialize-form-value

Conversation

@mjchang
Copy link
Contributor

@mjchang mjchang commented Mar 21, 2022

Resolve #449

The root of the problem is setIn returns undefined if you pass in an undefined value. I assume this is intentional so I just added the || {} to ensure that form.values can never be undefined.

@erikras erikras merged commit 3af52bf into final-form:main Apr 1, 2022
@mjchang mjchang deleted the undefined-initialize-form-value branch April 1, 2022 15:53
@mjchang
Copy link
Contributor Author

mjchang commented Apr 25, 2022

@erikras Can you make a release that includes a fix for this?

@erikras
Copy link
Member

erikras commented Apr 27, 2022

Published in v4.20.7.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

keepDirtyOnReinitialize can't handle undefined value

2 participants