Skip to content

Stop coercing empty optional fields to undefined values #1106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2022
Merged

Stop coercing empty optional fields to undefined values #1106

merged 1 commit into from
Sep 19, 2022

Conversation

cwouam
Copy link
Contributor

@cwouam cwouam commented Sep 14, 2022

While using create to coerce some data, optional fields are defined to undefined values.
This causes problems when storing the result directly in MongoDB (generates null values).
The PR removes these undefined fields from the result of the create call.

Fix for #981

@ianstormtaylor
Copy link
Owner

Great call, thanks @cwouam!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants