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

Allow for false and zero field values to be re-initialized correctly #421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juancstlm
Copy link

Allow for falsy values such as false and 0 to be re-initialized properly without reverting back to the initial value if they are false or 0

// Otherwise use the fields initial value
if (
!this.getValue(name) &&
(this.getValue(name) == null || this.getValue(name) == undefined) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for the OR clause as undefined already equals null

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed please make that change

@joepuzzo joepuzzo self-requested a review September 30, 2022 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants