Skip to content
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

Default value "" in schema will cast to undefined #267

Open
GoodGuyGoose opened this issue Sep 5, 2023 · 1 comment
Open

Default value "" in schema will cast to undefined #267

GoodGuyGoose opened this issue Sep 5, 2023 · 1 comment
Assignees
Labels

Comments

@GoodGuyGoose
Copy link

GoodGuyGoose commented Sep 5, 2023

When setting a property's value to an empty string in a schema, the schema will cast the value to undefined rather than retain the empty string. E.g:

"composition": {"\\$type": "string", "default": ""}
// will return undefined

@kjellmorten
Copy link
Collaborator

I tried to replicate this, @GoodGuyGoose, but was not able to find the cause for it within the Integreat package. Here's the tests I wrote to verify: a51dce1

Perhaps this is something that happens in the integreat-server package or due to some other gotcha in the mutations.

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

No branches or pull requests

2 participants