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

Fixes bug where falsy choice values incorrectly take the choice name. #98

Merged
merged 1 commit into from
Feb 23, 2014

Conversation

mark-buer
Copy link

Choices with falsy values cause the value to take-on the name, which (IMHO) is not expected.
In my use-case, I would like to use numbers (including zero) as values.
I could imagine using null or undefined as values too, depending on the situation.

This patch makes such things possible.

This fix might cause issues for existing users if they were relying on the existing behaviour.

@SBoudrias
Copy link
Owner

Awesome, great solution too. I'll publish with next release!

SBoudrias added a commit that referenced this pull request Feb 23, 2014
Fixes bug where falsy choice values incorrectly take the choice name.
@SBoudrias SBoudrias merged commit 1b9c4e4 into SBoudrias:master Feb 23, 2014
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.

2 participants