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

Ensure we do not corrupt the userTypeAttr definition when encountering a boolean false value #1413

Merged

Conversation

lucasnetau
Copy link
Collaborator

When a user configured a userTypeAttr with value: false but no type: checkbox the origValue calculation in processTypeUserAttrs would set the false to '' , this would cause the typeUserAttrs value definition to be changed when resetting the tUA.value to the original value.

This had the affect that when additional fields are added with this typeUserAttrs, processTypeUserAttrs would see the value as type string and output a textbox instead of a checkbox.

value: true would be detected as boolean and always kept as boolean. This PR ensures value: false works the same way.

One of the issues raised in #915

Copy link
Owner

@kevinchappell kevinchappell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good fix. thanks for explaining in the description

@kevinchappell kevinchappell merged commit ce9cd2e into kevinchappell:master Sep 21, 2023
@github-actions
Copy link

🎉 This PR is included in version 3.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lucasnetau lucasnetau deleted the booleanTypeAttrDetect branch September 21, 2023 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants